Skip to content

Commit

Permalink
Fixed bug #4284, "Syslog driver doesn't use $_syslog_levels"
Browse files Browse the repository at this point in the history
All log messages of level Log::STRACE are converted to Log::DEBUG for
the syslog driver.
  • Loading branch information
AlexC committed Jan 24, 2012
1 parent 962c5f1 commit 992dbd6
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions classes/kohana/log/syslog.php
Expand Up @@ -15,16 +15,6 @@ class Kohana_Log_Syslog extends Log_Writer {
*/
protected $_ident;

/**
* @var array log levels
*/
protected $_syslog_levels = array('ERROR' => LOG_ERR,
'CRITICAL' => LOG_CRIT,
'STRACE' => LOG_ALERT,
'ALERT' => LOG_WARNING,
'INFO' => LOG_INFO,
'DEBUG' => LOG_DEBUG);

/**
* Creates a new syslog logger.
*
Expand Down Expand Up @@ -52,6 +42,10 @@ public function write(array $messages)
{
foreach ($messages as $message)
{
if (Log::STRACE == $message['level'])
{
$message['level'] = Log::DEBUG;
}
syslog($message['level'], $message['body']);
}
}
Expand Down

0 comments on commit 992dbd6

Please sign in to comment.