aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/dav/lib/HookManager.php1
-rw-r--r--remote.php5
2 files changed, 4 insertions, 2 deletions
diff --git a/apps/dav/lib/HookManager.php b/apps/dav/lib/HookManager.php
index fcb6839a1f9..f0fdd5cfd4f 100644
--- a/apps/dav/lib/HookManager.php
+++ b/apps/dav/lib/HookManager.php
@@ -35,6 +35,7 @@ use OCP\Defaults;
use OCP\IUser;
use OCP\IUserManager;
use OCP\Util;
+use Psr\Log\LoggerInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
class HookManager {
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);
}
}