Merge pull request #23093 from nextcloud/backport/23083/stable19
[stable19] Generate exception to log on php errors
This commit is contained in:
commit
75bc0bc105
|
@ -88,12 +88,14 @@ class ErrorHandler {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$msg = $message . ' at ' . $file . '#' . $line;
|
$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
|
//Recoverable handler which catch all errors, warnings and notices
|
||||||
public static function onAll($number, $message, $file, $line) {
|
public static function onAll($number, $message, $file, $line) {
|
||||||
$msg = $message . ' at ' . $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]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue