Removing Configure::write('log'). This feature is now part of Error configuration.

Removing log check from Debugger::showError().  This method only show's errors, it shouldn't be logging them as well.
This commit is contained in:
mark_story 2010-11-14 23:24:12 -05:00
parent 14a6368b39
commit af4447d55d
2 changed files with 10 additions and 27 deletions

View file

@ -35,21 +35,6 @@
*/
Configure::write('debug', 2);
/**
* CakePHP Log Level:
*
* In case of Production Mode CakePHP gives you the possibility to continue logging errors.
*
* The following parameters can be used:
* Boolean: Set true/false to activate/deactivate logging
* Configure::write('log', true);
*
* Integer: Use built-in PHP constants to set the error level (see error_reporting)
* Configure::write('log', E_ERROR | E_WARNING);
* Configure::write('log', E_ALL ^ E_NOTICE);
*/
Configure::write('log', true);
/**
* Configure the Error handler used to handle errors for your application. By default
* ErrorHandler::handleError() is used. It will display errors using Debugger, when debug > 0
@ -57,18 +42,22 @@
*
* Options:
*
* - `handler` The callback to handle errors. You can set this to any callback type, including anonymous functions.
* - `level` The level of errors you are interested in capturing.
* - `handler` - callback - The callback to handle errors. You can set this to any callback type,
* including anonymous functions.
* - `level` - int - The level of errors you are interested in capturing.
* - `trace` - boolean - Include stack traces for errors in log files.
*/
Configure::write('Error', array(
'handler' => 'ErrorHandler::handleError',
'level' => E_ALL & ~E_DEPRECATED
'level' => E_ALL & ~E_DEPRECATED,
'trace' => true
));
/**
* Configure the default Exception handler. This method will be invoked each time there is an uncaught exception
* by default, ErrorHandler::handleException() is used. It will display a HTML page for the exception, and
* while debug > 0, framework errors like Missing Controller will be displayed.
* Configure the Exception handler used for uncaught exceptions. By default,
* ErrorHandler::handleException() is used. It will display a HTML page for the exception, and
* while debug > 0, framework errors like Missing Controller will be displayed. When debug = 0,
* framework errors will be coerced into generic HTTP errors.
*/
Configure::write('Exception', array(
'handler' => 'ErrorHandler::handleException'

View file

@ -293,12 +293,6 @@ class Debugger {
);
echo $_this->outputError($data);
if (Configure::read('log')) {
$tpl = $_this->_templates['log']['error'];
$options = array('before' => '{:', 'after' => '}');
CakeLog::write($level, String::insert($tpl, $data, $options));
}
if ($error == 'Fatal Error') {
exit();
}