Invert default log configuration.

Windows only has 4 log levels instead of 8.  This causes notice errors
when trying to use 'alert' and a few other levels.

Fixes #3055
This commit is contained in:
mark_story 2012-07-21 20:42:37 -04:00
parent ab6fab6675
commit a27e171f0f

View file

@ -88,14 +88,14 @@ class CakeLog {
* @var array
*/
protected static $_defaultLevels = array(
LOG_EMERG => 'emergency',
LOG_ALERT => 'alert',
LOG_CRIT => 'critical',
LOG_ERR => 'error',
LOG_WARNING => 'warning',
LOG_NOTICE => 'notice',
LOG_INFO => 'info',
LOG_DEBUG => 'debug',
'emergency' => LOG_EMERG,
'alert' => LOG_ALERT,
'critical' => LOG_CRIT,
'error' => LOG_ERR,
'warning' => LOG_WARNING,
'notice' => LOG_NOTICE,
'info' => LOG_INFO,
'debug' => LOG_DEBUG,
);
/**
@ -276,8 +276,8 @@ class CakeLog {
* @return array default log levels
*/
public static function defaultLevels() {
self::$_levels = self::$_defaultLevels;
self::$_levelMap = array_flip(self::$_levels);
self::$_levelMap = self::$_defaultLevels;
self::$_levels = array_flip(self::$_levelMap);
return self::$_levels;
}