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