mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-01 10:50:21 +02:00
Merge pull request #393 from kerdany/error_handler_patch
Add 'code', 'message' keys to ErrorHandler log record's context array.
This commit is contained in:
@@ -142,7 +142,7 @@ class ErrorHandler
|
||||
}
|
||||
|
||||
$level = isset($this->errorLevelMap[$code]) ? $this->errorLevelMap[$code] : LogLevel::CRITICAL;
|
||||
$this->logger->log($level, self::codeToString($code).': '.$message, array('file' => $file, 'line' => $line));
|
||||
$this->logger->log($level, self::codeToString($code).': '.$message, array('code' => $code, 'message' => $message, 'file' => $file, 'line' => $line));
|
||||
|
||||
if ($this->previousErrorHandler === true) {
|
||||
return false;
|
||||
@@ -163,7 +163,7 @@ class ErrorHandler
|
||||
$this->logger->log(
|
||||
$this->fatalLevel === null ? LogLevel::ALERT : $this->fatalLevel,
|
||||
'Fatal Error ('.self::codeToString($lastError['type']).'): '.$lastError['message'],
|
||||
array('file' => $lastError['file'], 'line' => $lastError['line'])
|
||||
array('code' => $lastError['type'], 'message' => $lastError['message'], 'file' => $lastError['file'], 'line' => $lastError['line'])
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user