mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-23 17:46:09 +02:00
Merge branch '1.x'
This commit is contained in:
@@ -164,7 +164,7 @@ class ErrorHandler
|
||||
// fatal error codes are ignored if a fatal error handler is present as well to avoid duplicate log entries
|
||||
if (!$this->hasFatalErrorHandler || !in_array($code, self::$fatalErrors, true)) {
|
||||
$level = isset($this->errorLevelMap[$code]) ? $this->errorLevelMap[$code] : LogLevel::CRITICAL;
|
||||
$this->logger->log($level, self::codeToString($code).': '.$message, ['code' => $code, 'message' => $message, 'file' => $file, 'line' => $line]);
|
||||
$this->logger->log($level, self::codeToString($code).': '.$message, ['code' => $code, 'message' => $message, 'file' => $file, 'line' => $line, 'context' => $context]);
|
||||
}
|
||||
|
||||
if ($this->previousErrorHandler === true) {
|
||||
|
||||
@@ -52,7 +52,7 @@ class HtmlFormatter extends NormalizerFormatter
|
||||
* @param bool $escapeTd false if td content must not be html escaped
|
||||
* @return string
|
||||
*/
|
||||
private function addRow($th, $td = ' ', $escapeTd = true)
|
||||
protected function addRow($th, $td = ' ', $escapeTd = true)
|
||||
{
|
||||
$th = htmlspecialchars($th, ENT_NOQUOTES, 'UTF-8');
|
||||
if ($escapeTd) {
|
||||
@@ -69,7 +69,7 @@ class HtmlFormatter extends NormalizerFormatter
|
||||
* @param int $level Error level
|
||||
* @return string
|
||||
*/
|
||||
private function addTitle($title, $level)
|
||||
protected function addTitle($title, $level)
|
||||
{
|
||||
$title = htmlspecialchars($title, ENT_NOQUOTES, 'UTF-8');
|
||||
|
||||
|
||||
@@ -75,6 +75,16 @@ class GroupHandler extends Handler implements ProcessableHandlerInterface
|
||||
*/
|
||||
public function handleBatch(array $records)
|
||||
{
|
||||
if ($this->processors) {
|
||||
$processed = array();
|
||||
foreach ($records as $record) {
|
||||
foreach ($this->processors as $processor) {
|
||||
$processed[] = call_user_func($processor, $record);
|
||||
}
|
||||
}
|
||||
$records = $processed;
|
||||
}
|
||||
|
||||
foreach ($this->handlers as $handler) {
|
||||
$handler->handleBatch($records);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user