1
0
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:
Christophe Coevoet
2011-04-06 00:50:18 +02:00
parent c6f59a7b7c
commit 87332a3e4e
14 changed files with 247 additions and 48 deletions

View File

@@ -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();