aboutsummaryrefslogtreecommitdiffstats
path: root/ocs
diff options
context:
space:
mode:
Diffstat (limited to 'ocs')
-rw-r--r--ocs/v1.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/ocs/v1.php b/ocs/v1.php
index 55e9f426aba..a2c8adeb982 100644
--- a/ocs/v1.php
+++ b/ocs/v1.php
@@ -42,6 +42,7 @@ if (\OCP\Util::needUpgrade()
}
use OCP\Security\Bruteforce\MaxDelayReached;
+use Psr\Log\LoggerInterface;
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
@@ -81,7 +82,7 @@ try {
} catch (\OC\User\LoginException $e) {
OC_API::respond(new \OC\OCS\Result(null, \OCP\AppFramework\OCSController::RESPOND_UNAUTHORISED, 'Unauthorised'));
} catch (\Exception $e) {
- \OC::$server->getLogger()->logException($e);
+ \OCP\Server::get(LoggerInterface::class)->error($e->getMessage(), ['exception' => $e]);
OC_API::setContentType();
$format = \OC::$server->getRequest()->getParam('format', 'xml');