]> source.dussan.org Git - nextcloud-server.git/commitdiff
Generate exception to log on php errors 23092/head
authorJulius Härtl <jus@bitgrid.net>
Tue, 29 Sep 2020 06:54:53 +0000 (08:54 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Tue, 29 Sep 2020 08:17:21 +0000 (08:17 +0000)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
lib/private/Log/ErrorHandler.php

index d37af8212a05cdae7d1b80b4a044692b408e09aa..e87da0b5d83ddab571ae0994c5dac4cab194847b 100644 (file)
@@ -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]);
        }
 }