Permalink
Browse files

reorder constant definitions

  • Loading branch information...
1 parent 05243a1 commit a269a123c4f510d9687d458d6754d04ccc65e099 @rchavik rchavik committed May 10, 2012
Showing with 9 additions and 9 deletions.
  1. +9 −9 lib/Cake/Log/CakeLog.php
View
@@ -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 @@ public static function write($type, $message) {
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])) {

0 comments on commit a269a12

Please sign in to comment.