From 166773879ba20bf7b81f3996a7c4e2a9ff7ee16d Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Tue, 6 Feb 2024 11:22:09 +0100 Subject: fix!: Migrate jobs away from deprecated interfaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BREAKING CHANGE: Removed ILogFactory::getCustomLogger deprecated method Signed-off-by: Côme Chilliet --- core/ajax/update.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'core/ajax') diff --git a/core/ajax/update.php b/core/ajax/update.php index a826b6b7e7a..63d1bd3cf5e 100644 --- a/core/ajax/update.php +++ b/core/ajax/update.php @@ -43,8 +43,8 @@ use OCP\EventDispatcher\IEventDispatcher; use OCP\IEventSource; use OCP\IEventSourceFactory; use OCP\IL10N; -use OCP\ILogger; use OCP\L10N\IFactory; +use Psr\Log\LoggerInterface; if (!str_contains(@ini_get('disable_functions'), 'set_time_limit')) { @set_time_limit(0); @@ -186,10 +186,12 @@ if (\OCP\Util::needUpgrade()) { try { $updater->upgrade(); } catch (\Exception $e) { - \OC::$server->getLogger()->logException($e, [ - 'level' => ILogger::ERROR, - 'app' => 'update', - ]); + \OCP\Server::get(LoggerInterface::class)->error( + $e->getMessage(), + [ + 'exception' => $e, + 'app' => 'update', + ]); $eventSource->send('failure', get_class($e) . ': ' . $e->getMessage()); $eventSource->close(); exit(); -- cgit v1.2.3