diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-03-31 16:25:31 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-05-02 10:52:44 +0200 |
commit | 771028dadab9a65957374478ecbd3e3e2f2a344e (patch) | |
tree | dfda3fa85296d5b09c52631553864ba061b97dca /remote.php | |
parent | 5fb9de62488dec879de14f0bf2b703b7a9c3a1b7 (diff) | |
download | nextcloud-server-771028dadab9a65957374478ecbd3e3e2f2a344e.tar.gz nextcloud-server-771028dadab9a65957374478ecbd3e3e2f2a344e.zip |
Add missing use for LoggerInterface
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'remote.php')
-rw-r--r-- | remote.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/remote.php b/remote.php index 69e3a53eeec..95855fea6ab 100644 --- a/remote.php +++ b/remote.php @@ -36,6 +36,7 @@ require_once __DIR__ . '/lib/versioncheck.php'; use OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin; use Sabre\DAV\Exception\ServiceUnavailable; use Sabre\DAV\Server; +use Psr\Log\LoggerInterface; /** * Class RemoteException @@ -57,7 +58,7 @@ function handleException($e) { $server = new Server(); if (!($e instanceof RemoteException)) { // we shall not log on RemoteException - $server->addPlugin(new ExceptionLoggerPlugin('webdav', \OC::$server->getLogger())); + $server->addPlugin(new ExceptionLoggerPlugin('webdav', \OC::$server->get(LoggerInterface::class))); } $server->on('beforeMethod:*', function () use ($e) { if ($e instanceof RemoteException) { @@ -82,7 +83,7 @@ function handleException($e) { // we shall not log on RemoteException OC_Template::printErrorPage($e->getMessage(), '', $e->getCode()); } else { - \OC::$server->getLogger()->logException($e, ['app' => 'remote']); + \OC::$server->get(LoggerInterface::class)->error($e->getMessage(), ['app' => 'remote','exception' => $e]); OC_Template::printExceptionErrorPage($e, $statusCode); } } |