mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-22 17:16:18 +02:00
Serialize exceptions in a minimalistic way in the LineFormatter
This commit is contained in:
@@ -72,6 +72,10 @@ class LineFormatter extends NormalizerFormatter
|
||||
return var_export($data, true);
|
||||
}
|
||||
|
||||
if ($data instanceof \Exception) {
|
||||
return '[object] ('.get_class($data).': '.$data->getMessage().' at '.$data->getFile().':'.$data->getLine().')';
|
||||
}
|
||||
|
||||
return parent::normalize($data);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user