Fixed regression when exception message swallowed when logging it.
This commit is contained in:
parent
ca0fdf8977
commit
042cb6b2b2
@ -147,6 +147,10 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_object($context)) {
|
if (is_object($context)) {
|
||||||
|
if ($context instanceof \Exception) {
|
||||||
|
return sprintf('Exception(%s): %s', get_class($context), $context->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
return sprintf('Object(%s)', get_class($context));
|
return sprintf('Object(%s)', get_class($context));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user