1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-07-31 10:20:14 +02:00

JsonFormatter::normalize() : respect date format from Formatter

This commit is contained in:
Thomas Hansen
2021-07-01 16:26:46 +02:00
committed by Jordi Boggiano
parent 0f7b11d383
commit b2ad71de59

View File

@@ -173,6 +173,10 @@ class JsonFormatter extends NormalizerFormatter
return $normalized;
}
if ($data instanceof \DateTimeInterface) {
return $this->formatDate($data);
}
if ($data instanceof Throwable) {
return $this->normalizeException($data, $depth);
}