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 = '';
if (is_scalar($message) === false) {
$text = print_r($message, true);
} else {
if ($message instanceof \Exception) {
$text = $message->getMessage()."\n".$message->getTraceAsString();
}
else if (is_scalar($message) === false) {
$text = print_r($message, 1);
}
else {
$text = $message;
}