Browse Source

Stating to move loggers to the new folder

José Lorenzo Rodríguez 15 years ago
parent
commit
ff8b1a1041

+ 1 - 6
lib/Cake/Error/ErrorHandler.php

@@ -21,6 +21,7 @@
  */
 
 App::uses('Debugger', 'Utility');
+App::uses('CakeLog', 'Log');
 
 /**
  *
@@ -109,9 +110,6 @@ class ErrorHandler {
 		App::import('Core', 'error/ExceptionRenderer');
 		$config = Configure::read('Exception');
 		if (!empty($config['log'])) {
-			if (!class_exists('CakeLog')) {
-				require LIBS . 'cake_log.php';
-			}
 			CakeLog::write(LOG_ERR, '[' . get_class($exception) . '] ' . $exception->getMessage());
 		}
 		if ($config['renderer'] !== 'ExceptionRenderer') {
@@ -158,9 +156,6 @@ class ErrorHandler {
 			);
 			return Debugger::getInstance()->outputError($data);
 		} else {
-			if (!class_exists('CakeLog')) {
-				require LIBS . 'cake_log.php';
-			}
 			$message = $error . ' (' . $code . '): ' . $description . ' in [' . $file . ', line ' . $line . ']';
 			if (!empty($errorConfig['trace'])) {
 				$trace = Debugger::trace(array('start' => 1, 'format' => 'log'));

+ 2 - 2
lib/Cake/I18n/I18n.php

@@ -21,8 +21,8 @@
 /**
  * Included libraries.
  */
-App::uses('L10n', 'Core');
-App::uses('Multibyte', 'Core');
+App::uses('L10n', 'I18n');
+App::uses('Multibyte', 'I18n');
 
 /**
  * I18n handles translation of Text and time format strings.

cake/libs/cake_log.php → lib/Cake/Log/CakeLog.php


cake/libs/log/file_log.php → lib/Cake/Log/Engine/FileLog.php