fix
This commit is contained in:
parent
428729ebf7
commit
bbe560277d
|
@ -44,7 +44,6 @@ class Loger extends FileTarget
|
|||
|
||||
public function formatMessage($result)
|
||||
{
|
||||
|
||||
$output = '';
|
||||
$url = '';
|
||||
$post = '';
|
||||
|
@ -70,10 +69,10 @@ class Loger extends FileTarget
|
|||
break;
|
||||
case 'json':
|
||||
$error = $result[0];
|
||||
if(is_a($error, 'Exception'))
|
||||
if(is_a($error, 'Exception') || is_a($error, '\Error'))
|
||||
{
|
||||
$message = $error->getMessage() . ' in '.$error->getFile().':'.$error->getLine();
|
||||
$output = json_encode([
|
||||
$output .= json_encode([
|
||||
'date' => date('Y-m-d H:i:s'),
|
||||
'url' => $url,
|
||||
'message' => $message ,
|
||||
|
@ -85,10 +84,8 @@ class Loger extends FileTarget
|
|||
}
|
||||
else
|
||||
{
|
||||
// $output = print_r($result, true);
|
||||
$output .= parent::formatMessage($result);
|
||||
}
|
||||
|
||||
// var_dump($output);
|
||||
break;
|
||||
case 'result':
|
||||
default :
|
||||
|
|
Loading…
Reference in New Issue