Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-03-31 17:25:31 +0300
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-05-02 11:52:44 +0300
commit771028dadab9a65957374478ecbd3e3e2f2a344e (patch)
treedfda3fa85296d5b09c52631553864ba061b97dca /remote.php
parent5fb9de62488dec879de14f0bf2b703b7a9c3a1b7 (diff)
Add missing use for LoggerInterface
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'remote.php')
-rw-r--r--remote.php5
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);
}
}