mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-22 00:56:08 +02:00
Added phpdoc for all methods and added the typehint for the FormatterInterface
This commit is contained in:
@@ -30,7 +30,7 @@ use Monolog\Logger;
|
||||
class SyslogHandler extends AbstractHandler
|
||||
{
|
||||
/**
|
||||
* Translate Monolog log levels to syslog log priorities.
|
||||
* Translates Monolog log levels to syslog log priorities.
|
||||
*/
|
||||
private $logLevels = array(
|
||||
Logger::DEBUG => LOG_DEBUG,
|
||||
@@ -56,6 +56,13 @@ class SyslogHandler extends AbstractHandler
|
||||
'uucp' => LOG_UUCP,
|
||||
);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $ident
|
||||
* @param mixed $facility
|
||||
* @param integer $level The minimum logging level at which this handler will be triggered
|
||||
* @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
|
||||
*/
|
||||
public function __construct($ident, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true)
|
||||
{
|
||||
parent::__construct($level, $bubble);
|
||||
@@ -83,11 +90,17 @@ class SyslogHandler extends AbstractHandler
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function write(array $record)
|
||||
{
|
||||
syslog($this->logLevels[$record['level']], (string) $record['message']);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function close()
|
||||
{
|
||||
closelog();
|
||||
|
Reference in New Issue
Block a user