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