From 0d31976690578c27cdd9de71e27e9a6084ead3a4 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sun, 15 Sep 2024 01:37:11 +0200 Subject: refactor(OC_Hook): Remove deprecated ILogger Signed-off-by: Ferdinand Thiessen --- lib/private/legacy/OC_Hook.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/private/legacy/OC_Hook.php b/lib/private/legacy/OC_Hook.php index 5c36a253895..e472b105498 100644 --- a/lib/private/legacy/OC_Hook.php +++ b/lib/private/legacy/OC_Hook.php @@ -5,6 +5,9 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + +use Psr\Log\LoggerInterface; + class OC_Hook { public static $thrownExceptions = []; @@ -82,7 +85,7 @@ class OC_Hook { call_user_func([ $i['class'], $i['name'] ], $params); } catch (Exception $e) { self::$thrownExceptions[] = $e; - \OC::$server->getLogger()->logException($e); + \OCP\Server::get(LoggerInterface::class)->error($e->getMessage(), ['exception' => $e]); if ($e instanceof \OCP\HintException) { throw $e; } -- cgit v1.2.3