mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-05 20:57:36 +02:00
Define properties
This commit is contained in:
@@ -29,6 +29,10 @@ use Monolog\Formatter\LineFormatter;
|
|||||||
*/
|
*/
|
||||||
class SyslogHandler extends AbstractProcessingHandler
|
class SyslogHandler extends AbstractProcessingHandler
|
||||||
{
|
{
|
||||||
|
protected $ident;
|
||||||
|
protected $logopts;
|
||||||
|
protected $facility;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translates Monolog log levels to syslog log priorities.
|
* Translates Monolog log levels to syslog log priorities.
|
||||||
*/
|
*/
|
||||||
@@ -110,7 +114,7 @@ class SyslogHandler extends AbstractProcessingHandler
|
|||||||
if (!openlog($this->ident, $this->logopts, $this->facility)) {
|
if (!openlog($this->ident, $this->logopts, $this->facility)) {
|
||||||
throw new \LogicException('Can\'t open syslog for ident "'.$this->ident.'" and facility "'.$this->facility.'"');
|
throw new \LogicException('Can\'t open syslog for ident "'.$this->ident.'" and facility "'.$this->facility.'"');
|
||||||
}
|
}
|
||||||
syslog($this->logLevels[$record['level']], (string)$record['formatted']);
|
syslog($this->logLevels[$record['level']], (string) $record['formatted']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user