Skip to content
Permalink
Browse files

changing LOG_ERROR to LOG_ERR in core files

  • Loading branch information...
rchavik committed May 11, 2012
1 parent 595cad8 commit e6860fb856265dba6ef1e5a27a40fc3ace712296
@@ -909,7 +909,7 @@ protected static function _checkFatalError() {
}
list(, $log) = ErrorHandler::mapErrorCode($lastError['type']);
if ($log !== LOG_ERROR) {
if ($log !== LOG_ERR) {
return;
}
@@ -146,7 +146,7 @@ protected function _stop($status = 0) {
* @param integer $type Error type constant. Defined in app/Config/core.php.
* @return boolean Success of log write
*/
public function log($msg, $type = LOG_ERROR) {
public function log($msg, $type = LOG_ERR) {
App::uses('CakeLog', 'Log');
if (!is_string($msg)) {
$msg = print_r($msg, true);
@@ -158,7 +158,7 @@ public static function handleError($code, $description, $file = null, $line = nu
}
$errorConfig = Configure::read('Error');
list($error, $log) = self::mapErrorCode($code);
if ($log === LOG_ERROR) {
if ($log === LOG_ERR) {
return self::handleFatalError($code, $description, $file, $line);
}
@@ -197,7 +197,7 @@ public static function handleError($code, $description, $file = null, $line = nu
*/
public static function handleFatalError($code, $description, $file, $line) {
$logMessage = 'Fatal Error (' . $code . '): ' . $description . ' in [' . $file . ', line ' . $line . ']';
CakeLog::write(LOG_ERROR, $logMessage);
CakeLog::write(LOG_ERR, $logMessage);
$exceptionHandler = Configure::read('Exception.handler');
if (!is_callable($exceptionHandler)) {
@@ -231,7 +231,7 @@ public static function mapErrorCode($code) {
case E_COMPILE_ERROR:
case E_USER_ERROR:
$error = 'Fatal Error';
$log = LOG_ERROR;
$log = LOG_ERR;
break;
case E_WARNING:
case E_USER_WARNING:
@@ -77,7 +77,7 @@ public function testConsoleOutputWrites() {
$message = 'Test error message';
$mock->expects($this->once())
->method('write');
TestCakeLog::write(LOG_ERROR, $message);
TestCakeLog::write(LOG_ERR, $message);
}
/**
@@ -96,7 +96,7 @@ public function testCombinedLogWriting() {
$message = 'Test error message';
$mock->expects($this->once())
->method('write');
TestCakeLog::write(LOG_ERROR, $message);
TestCakeLog::write(LOG_ERR, $message);
$this->assertTrue(file_exists(LOGS . 'error.log'), 'error.log missing');
$logOutput = file_get_contents(LOGS . 'error.log');
$this->assertContains($message, $logOutput);
@@ -227,7 +227,7 @@ public static function showError($code, $description, $file = null, $line = null
case E_COMPILE_ERROR:
case E_USER_ERROR:
$error = 'Fatal Error';
$level = LOG_ERROR;
$level = LOG_ERR;
break;
case E_WARNING:
case E_USER_WARNING:

0 comments on commit e6860fb

Please sign in to comment.
You can’t perform that action at this time.