mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-06 21:26:43 +02:00
@@ -141,7 +141,7 @@ class LineFormatter extends NormalizerFormatter
|
|||||||
|
|
||||||
$str = '[object] ('.get_class($e).'(code: '.$e->getCode().'): '.$e->getMessage().' at '.$e->getFile().':'.$e->getLine().$previousText.')';
|
$str = '[object] ('.get_class($e).'(code: '.$e->getCode().'): '.$e->getMessage().' at '.$e->getFile().':'.$e->getLine().$previousText.')';
|
||||||
if ($this->includeStacktraces) {
|
if ($this->includeStacktraces) {
|
||||||
$str .= "\n[stacktrace]\n".$e->getTraceAsString();
|
$str .= "\n[stacktrace]\n".$e->getTraceAsString()."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $str;
|
return $str;
|
||||||
@@ -167,6 +167,10 @@ class LineFormatter extends NormalizerFormatter
|
|||||||
protected function replaceNewlines($str)
|
protected function replaceNewlines($str)
|
||||||
{
|
{
|
||||||
if ($this->allowInlineLineBreaks) {
|
if ($this->allowInlineLineBreaks) {
|
||||||
|
if (0 === strpos($str, '{')) {
|
||||||
|
return str_replace(['\r', '\n'], ["\r", "\n"], $str);
|
||||||
|
}
|
||||||
|
|
||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user