refactor(OC_Hook): Remove deprecated ILogger

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
Ferdinand Thiessen 2024-09-15 01:37:11 +02:00
parent 69abd8851b
commit 0d31976690
No known key found for this signature in database
GPG key ID: 45FAE7268762B400

View file

@ -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;
}