mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-07 13:46:38 +02:00
Check for JsonSerializable in normalizeException
This commit is contained in:
committed by
Alex Calinescu
parent
ebb804e432
commit
b40fec3b7e
@@ -182,6 +182,10 @@ class NormalizerFormatter implements FormatterInterface
|
||||
*/
|
||||
protected function normalizeException(Throwable $e, int $depth = 0)
|
||||
{
|
||||
if ($e instanceof \JsonSerializable) {
|
||||
return (array) $e->jsonSerialize();
|
||||
}
|
||||
|
||||
$data = [
|
||||
'class' => Utils::getClass($e),
|
||||
'message' => $e->getMessage(),
|
||||
|
Reference in New Issue
Block a user