...
$this->setShared('log', function ()
{
$logger = new \Phalcon\Logger\Multiple();
$logger->push(new \Phalcon\Logger\Adapter\File(LOG_PATH));
$logger->push(new \Phalcon\Logger\Adapter\Firephp());
return $logger;
});
...
catch (\Exception $e)
{
$trace = $e->getTrace(); // correct trace with multiple items
$app->log->critical("Caught Exception: " . $e->getMessage(), $trace);
}
causes
{
...
"backtrace":[
{
"function":"format",
"class":"Phalcon\\Logger\\Formatter\\Firephp",
"type":"->"
},
{
"function":"logInternal",
"class":"Phalcon\\Logger\\Adapter\\Firephp",
"type":"->"
},
{
"function":"log",
"class":"Phalcon\\Logger\\Adapter",
"type":"->"
},
{
"function":"log",
"class":"Phalcon\\Logger\\Multiple",
"type":"->"
},
{
"file":"\/home\/user\/www\/index.php",
"line":60,
"function":"critical",
"class":"Phalcon\\Logger\\Multiple",
"type":"->"
}
]
....
in browser headers instead of correct exception trace. Exception message displayed as expected.