Kohana v3.3.2

This commit is contained in:
Deon George
2014-09-06 23:43:07 +10:00
parent f96694b18f
commit 8888719653
236 changed files with 1685 additions and 996 deletions

View File

@@ -12,21 +12,21 @@ abstract class Kohana_Log_Writer {
/**
* @var string timestamp format for log entries.
*
*
* Defaults to Date::$timestamp_format
*/
public static $timestamp;
/**
* @var string timezone for log entries
*
*
* Defaults to Date::$timezone, which defaults to date_default_timezone_get()
*/
public static $timezone;
/**
* Numeric log level to string lookup table.
* @var array
* @var array
*/
protected $_log_levels = array(
LOG_EMERG => 'EMERGENCY',
@@ -68,7 +68,7 @@ abstract class Kohana_Log_Writer {
/**
* Formats a log entry.
*
*
* @param array $message
* @param string $format
* @return string
@@ -78,7 +78,7 @@ abstract class Kohana_Log_Writer {
$message['time'] = Date::formatted_time('@'.$message['time'], Log_Writer::$timestamp, Log_Writer::$timezone, TRUE);
$message['level'] = $this->_log_levels[$message['level']];
$string = strtr($format, $message);
$string = strtr($format, array_filter($message, 'is_scalar'));
if (isset($message['additional']['exception']))
{
@@ -86,10 +86,10 @@ abstract class Kohana_Log_Writer {
$message['body'] = $message['additional']['exception']->getTraceAsString();
$message['level'] = $this->_log_levels[Log_Writer::$strace_level];
$string .= PHP_EOL.strtr($format, $message);
$string .= PHP_EOL.strtr($format, array_filter($message, 'is_scalar'));
}
return $string;
}
} // End Kohana_Log_Writer
}