/** * Constructor * * @param PublisherInterface * @param string host e.g. domain * @param mixed facitly e.g. component * @param string log level * * facility can be any string or an integer according to syslog facility * numbers (You can set and overwrite facility names in the web interface) * 0 = kernel messages * 1 = user-level messages * 2 = mail system * 3 = system daemons * 4 = security/authorization messages * 5 = messages generated internally by syslogd * 6 = line printer subsystem * 7 = network news subsystem * 8 = UUCP subsystem * 9 = clock daemon * 10 = security/authorization messages * 11 = FTP daemon * 12 = NTP subsystem * 13 = log audit * 14 = log alert * 15 = clock daemon * 16 = local0 * 17 = local1 * 18 = local2 * 19 = local3 * 20 = local4 * 21 = local5 * 22 = local6 * 23 = local7 */ public function __construct(PublisherInterface $publisher, $host, $facility, $level = LogLevel::DEBUG) { $this->setPublisher($publisher); $this->setHost($host); $this->setFacility($facility); parent::__construct($level); }
/** * Constructor * * @param string|File\\SplFileInfo path to cache directory * @param string log level */ public function __construct($pathname, $level = LogLevel::DEBUG) { if ($pathname instanceof File) { $fileObject = $pathname; } elseif ($pathname instanceof \SplFileInfo) { $fileObject = new File($pathname); } else { $fileObject = new File($pathname); } $this->setFileObject($fileObject); parent::__construct($level); }