Skip to content

Commit

Permalink
Invert default log configuration.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
markstory committed Jul 22, 2012
1 parent ab6fab6 commit a27e171
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/Cake/Log/CakeLog.php
Expand Up @@ -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,
);

/**
Expand Down Expand Up @@ -276,8 +276,8 @@ public static function levels($levels = array(), $append = true) {
* @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;
}

Expand Down

0 comments on commit a27e171

Please sign in to comment.