Skip to content
Snippets Groups Projects
Unverified Commit b0699d41 authored by Julius Härtl's avatar Julius Härtl
Browse files

Generate exception to log on php errors


Signed-off-by: default avatarJulius Härtl <jus@bitgrid.net>
parent 7d060279
No related branches found
No related tags found
No related merge requests found
......@@ -88,12 +88,14 @@ class ErrorHandler {
return;
}
$msg = $message . ' at ' . $file . '#' . $line;
self::$logger->error(self::removePassword($msg), ['app' => 'PHP']);
$e = new \Error(self::removePassword($msg));
self::$logger->logException($e, ['app' => 'PHP']);
}
//Recoverable handler which catch all errors, warnings and notices
public static function onAll($number, $message, $file, $line) {
$msg = $message . ' at ' . $file . '#' . $line;
self::$logger->debug(self::removePassword($msg), ['app' => 'PHP']);
$e = new \Error(self::removePassword($msg));
self::$logger->logException($e, ['app' => 'PHP', 'level' => 0]);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment