From a269a123c4f510d9687d458d6754d04ccc65e099 Mon Sep 17 00:00:00 2001 From: Rachman Chavik Date: Thu, 10 May 2012 20:33:58 +0700 Subject: [PATCH] reorder constant definitions --- lib/Cake/Log/CakeLog.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/Cake/Log/CakeLog.php b/lib/Cake/Log/CakeLog.php index 428323927..000f18106 100644 --- a/lib/Cake/Log/CakeLog.php +++ b/lib/Cake/Log/CakeLog.php @@ -24,6 +24,12 @@ * system. * */ +if (!defined('LOG_ERROR')) { + define('LOG_ERROR', 2); +} +if (!defined('LOG_ERR')) { + define('LOG_ERR', LOG_ERROR); +} if (!defined('LOG_WARNING')) { define('LOG_WARNING', 3); } @@ -251,19 +257,13 @@ class CakeLog { if (empty(self::$_Collection)) { self::_init(); } - if (!defined('LOG_ERROR')) { - define('LOG_ERROR', 2); - } - if (!defined('LOG_ERR')) { - define('LOG_ERR', LOG_ERROR); - } $levels = array( + LOG_ERROR => 'error', + LOG_ERR => 'error', LOG_WARNING => 'warning', LOG_NOTICE => 'notice', - LOG_INFO => 'info', LOG_DEBUG => 'debug', - LOG_ERR => 'error', - LOG_ERROR => 'error' + LOG_INFO => 'info', ); if (is_int($type) && isset($levels[$type])) {