mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-27 18:51:34 +01:00
Normalize DIRECTORY_SEPARATOR on file traces(exceptions) (#1980)
This commit is contained in:
@@ -278,7 +278,7 @@ class LineFormatter extends NormalizerFormatter
|
|||||||
$file = preg_replace('{^'.preg_quote($this->basePath).'}', '', $file);
|
$file = preg_replace('{^'.preg_quote($this->basePath).'}', '', $file);
|
||||||
}
|
}
|
||||||
|
|
||||||
$str .= '): ' . $e->getMessage() . ' at ' . $file . ':' . $e->getLine() . ')';
|
$str .= '): ' . $e->getMessage() . ' at ' . strtr((string) $file, DIRECTORY_SEPARATOR, '/') . ':' . $e->getLine() . ')';
|
||||||
|
|
||||||
if ($this->includeStacktraces) {
|
if ($this->includeStacktraces) {
|
||||||
$str .= $this->stacktracesParser($e);
|
$str .= $this->stacktracesParser($e);
|
||||||
@@ -307,7 +307,7 @@ class LineFormatter extends NormalizerFormatter
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
return "\n{$this->indentStacktraces}[stacktrace]\n{$this->indentStacktraces}" . $trace . "\n";
|
return "\n{$this->indentStacktraces}[stacktrace]\n{$this->indentStacktraces}" . strtr($trace, DIRECTORY_SEPARATOR, '/') . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
private function stacktracesParserCustom(string $trace): string
|
private function stacktracesParserCustom(string $trace): string
|
||||||
|
|||||||
Reference in New Issue
Block a user