Skip to content
Snippets Groups Projects

Adding a catch for php Error (not only exception)

Closed churel requested to merge issue/filelog-3270867:3270867-call-to-undefined into 2.0.x
1 file
+ 4
2
Compare changes
  • Side-by-side
  • Inline
+ 4
2
@@ -155,9 +155,8 @@ class FileLog implements LoggerInterface {
return;
}
$entry = $this->render($level, $message, $context);
try {
$entry = $this->render($level, $message, $context);
$this->openFile();
$this->write($entry);
}
@@ -169,6 +168,9 @@ class FileLog implements LoggerInterface {
// Write the message directly to STDERR.
fwrite($this->stderr(), $entry . "\n");
}
catch (\Throwable $error) {
fwrite($this->stderr(), $message . "\n");
}
}
/**
Loading