diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-02-08 15:47:39 +0100 |
---|---|---|
committer | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2024-02-13 17:32:30 +0100 |
commit | c0ce272e9c3a94ff98081c4f90a31ca611d28323 (patch) | |
tree | e92ba163d28ac3eb888a95718a85a78909cdc7c7 /public.php | |
parent | 8822b16d37de1d1a3cec959d184261152c42ae41 (diff) | |
download | nextcloud-server-c0ce272e9c3a94ff98081c4f90a31ca611d28323.tar.gz nextcloud-server-c0ce272e9c3a94ff98081c4f90a31ca611d28323.zip |
chore: Migrate away from OC::$server->getLogger
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'public.php')
-rw-r--r-- | public.php | 6 |
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); } |