aboutsummaryrefslogtreecommitdiffstats
path: root/public.php
diff options
context:
space:
mode:
Diffstat (limited to 'public.php')
-rw-r--r--public.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/public.php b/public.php
index 9f3ffcec5e9..2bf710c72fc 100644
--- a/public.php
+++ b/public.php
@@ -32,6 +32,8 @@
*/
require_once __DIR__ . '/lib/versioncheck.php';
+use Psr\Log\LoggerInterface;
+
/**
* @param $service
* @return string
@@ -103,10 +105,10 @@ try {
$status = 503;
}
//show the user a detailed error page
- \OC::$server->getLogger()->logException($ex, ['app' => 'public']);
+ \OCP\Server::get(LoggerInterface::class)->error($ex->getMessage(), ['app' => 'public', 'exception' => $ex]);
OC_Template::printExceptionErrorPage($ex, $status);
} catch (Error $ex) {
//show the user a detailed error page
- \OC::$server->getLogger()->logException($ex, ['app' => 'public']);
+ \OCP\Server::get(LoggerInterface::class)->error($ex->getMessage(), ['app' => 'public', 'exception' => $ex]);
OC_Template::printExceptionErrorPage($ex, 500);
}