Kohana v3.3.2
This commit is contained in:
@@ -91,4 +91,4 @@ class Kohana_Log_File extends Log_Writer {
|
||||
}
|
||||
}
|
||||
|
||||
} // End Kohana_Log_File
|
||||
}
|
||||
|
@@ -5,8 +5,8 @@
|
||||
* @package Kohana
|
||||
* @category Logging
|
||||
* @author Kohana Team
|
||||
* @copyright (c) 2008-2012 Kohana Team
|
||||
* @license http://kohanaphp.com/license
|
||||
* @copyright (c) 2008-2014 Kohana Team
|
||||
* @license http://kohanaframework.org/license
|
||||
*/
|
||||
class Kohana_Log_StdErr extends Log_Writer {
|
||||
/**
|
||||
@@ -26,4 +26,4 @@ class Kohana_Log_StdErr extends Log_Writer {
|
||||
}
|
||||
}
|
||||
|
||||
} // End Kohana_Log_StdErr
|
||||
}
|
||||
|
@@ -5,8 +5,8 @@
|
||||
* @package Kohana
|
||||
* @category Logging
|
||||
* @author Kohana Team
|
||||
* @copyright (c) 2008-2012 Kohana Team
|
||||
* @license http://kohanaphp.com/license
|
||||
* @copyright (c) 2008-2014 Kohana Team
|
||||
* @license http://kohanaframework.org/license
|
||||
*/
|
||||
class Kohana_Log_StdOut extends Log_Writer {
|
||||
|
||||
@@ -27,4 +27,4 @@ class Kohana_Log_StdOut extends Log_Writer {
|
||||
}
|
||||
}
|
||||
|
||||
} // End Kohana_Log_StdOut
|
||||
}
|
||||
|
@@ -62,4 +62,4 @@ class Kohana_Log_Syslog extends Log_Writer {
|
||||
closelog();
|
||||
}
|
||||
|
||||
} // End Kohana_Log_Syslog
|
||||
}
|
||||
|
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user