Skip to content

Commit

Permalink
Normalize call normalizeRecord if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
johndodev authored Aug 11, 2024
1 parent f4393b6 commit ba6305f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Monolog/Formatter/JsonFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ protected function normalize(mixed $data, int $depth = 0): mixed
}

if (\is_object($data)) {
if ($data instanceof LogRecord) {
return $this->normalizeRecord($data);
}

if ($data instanceof \DateTimeInterface) {
return $this->formatDate($data);
}
Expand Down

0 comments on commit ba6305f

Please sign in to comment.