1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-24 18:16:10 +02:00

Merge branch '2.x'

This commit is contained in:
Jordi Boggiano
2022-07-22 15:51:15 +02:00
21 changed files with 181 additions and 42 deletions

View File

@@ -218,6 +218,10 @@ class NormalizerFormatter implements FormatterInterface
*/
protected function normalizeException(Throwable $e, int $depth = 0)
{
if ($depth > $this->maxNormalizeDepth) {
return ['Over ' . $this->maxNormalizeDepth . ' levels deep, aborting normalization'];
}
if ($e instanceof \JsonSerializable) {
return (array) $e->jsonSerialize();
}