Added a specific handling for a proper outpur of Exceptions in the log.

This commit is contained in:
Franck Allimant
2014-02-04 00:51:38 +01:00
parent b18718293f
commit 102d5239a9

View File

@@ -663,9 +663,13 @@ class Tlog Implements LoggerInterface
{ {
$text = ''; $text = '';
if (is_scalar($message) === false) { if ($message instanceof \Exception) {
$text = print_r($message, true); $text = $message->getMessage()."\n".$message->getTraceAsString();
} else { }
else if (is_scalar($message) === false) {
$text = print_r($message, 1);
}
else {
$text = $message; $text = $message;
} }