From 0a9371f99f05786068d6f6a72b9a717ec24690a8 Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Tue, 19 Sep 2023 16:06:40 +0200 Subject: Migrate applications away from deprecated ILogger MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- apps/updatenotification/lib/AppInfo/Application.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'apps/updatenotification') diff --git a/apps/updatenotification/lib/AppInfo/Application.php b/apps/updatenotification/lib/AppInfo/Application.php index 3290b88dcf9..adc16bcb54b 100644 --- a/apps/updatenotification/lib/AppInfo/Application.php +++ b/apps/updatenotification/lib/AppInfo/Application.php @@ -40,10 +40,10 @@ use OCP\AppFramework\IAppContainer; use OCP\AppFramework\QueryException; use OCP\IConfig; use OCP\IGroupManager; -use OCP\ILogger; use OCP\IUser; use OCP\IUserSession; use OCP\Util; +use Psr\Log\LoggerInterface; class Application extends App implements IBootstrap { public function __construct() { @@ -56,11 +56,11 @@ class Application extends App implements IBootstrap { public function boot(IBootContext $context): void { $context->injectFn(function (IConfig $config, - IUserSession $userSession, - IAppManager $appManager, - IGroupManager $groupManager, - IAppContainer $appContainer, - ILogger $logger) { + IUserSession $userSession, + IAppManager $appManager, + IGroupManager $groupManager, + IAppContainer $appContainer, + LoggerInterface $logger) { if ($config->getSystemValue('updatechecker', true) !== true) { // Updater check is disabled return; @@ -77,7 +77,7 @@ class Application extends App implements IBootstrap { try { $updateChecker = $appContainer->get(UpdateChecker::class); } catch (QueryException $e) { - $logger->logException($e); + $logger->error($e->getMessage(), ['exception' => $e]); return; } -- cgit v1.2.3