Lines Matching defs:facility
20 protected $facility;
27 * @param string $facility The type of log
29 protected function __construct($facility)
32 $this->facility = $facility;
34 // Should logging be disabled for this facility?
37 if (in_array($facility, $dontlog)) $this->isLogging = false;
41 * Return a Logger instance for the given facility
43 * @param string $facility The type of log
46 public static function getInstance($facility = self::LOG_ERROR)
48 if (empty(self::$instances[$facility])) {
49 self::$instances[$facility] = new Logger($facility);
51 return self::$instances[$facility];
112 * Log a message to the facility log
128 'facility' => $this->facility,
218 return $conf['logdir'] . '/' . $this->facility . '/' . date('Y-m-d', $date) . '.log';
222 * Write the given lines to today's facility log
232 fwrite($stderr, "\n[" . $this->facility . '] ' . implode("\n", $lines) . "\n");