Stating to move loggers to the new folder

This commit is contained in:
José Lorenzo Rodríguez 2010-12-04 13:50:26 -04:30
parent 6b40c9c854
commit ff8b1a1041
4 changed files with 3 additions and 8 deletions

View file

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

View file

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