1
0
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:
Jordi Boggiano
2013-03-17 19:26:08 +01:00
parent 041aa3930f
commit eaf2b07120
2 changed files with 19 additions and 0 deletions

View File

@@ -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);
}