1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-22 09:06:10 +02:00

Normalize the way backtraces are normalized and remove args for special cases, fixes #1346

This commit is contained in:
Jordi Boggiano
2019-08-16 12:34:04 +02:00
parent c35fbc24bb
commit 6688b45ebe
5 changed files with 11 additions and 38 deletions

View File

@@ -195,12 +195,8 @@ class JsonFormatter extends NormalizerFormatter
foreach ($trace as $frame) {
if (isset($frame['file'])) {
$data['trace'][] = $frame['file'].':'.$frame['line'];
} elseif (isset($frame['function']) && $frame['function'] === '{closure}') {
// We should again normalize the frames, because it might contain invalid items
$data['trace'][] = $frame['function'];
} else {
// We should again normalize the frames, because it might contain invalid items
$data['trace'][] = $this->normalize($frame);
$data['trace'][] = (!empty($frame['class']) ? $frame['class'].$frame['type'] : '').$frame['function'];
}
}
}