From 56ae87c281d2f54b23f98acf0e138d8e72196a06 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 16 Apr 2021 14:26:43 +0200 Subject: Less ILogger Signed-off-by: Joas Schilling --- lib/private/InitialStateService.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lib/private/InitialStateService.php') diff --git a/lib/private/InitialStateService.php b/lib/private/InitialStateService.php index bbc893269f7..38de49b4780 100644 --- a/lib/private/InitialStateService.php +++ b/lib/private/InitialStateService.php @@ -33,12 +33,12 @@ use OC\AppFramework\Bootstrap\Coordinator; use OCP\AppFramework\QueryException; use OCP\AppFramework\Services\InitialStateProvider; use OCP\IInitialStateService; -use OCP\ILogger; use OCP\IServerContainer; +use Psr\Log\LoggerInterface; class InitialStateService implements IInitialStateService { - /** @var ILogger */ + /** @var LoggerInterface */ private $logger; /** @var string[][] */ @@ -53,7 +53,7 @@ class InitialStateService implements IInitialStateService { /** @var IServerContainer */ private $container; - public function __construct(ILogger $logger, Coordinator $bootstrapCoordinator, IServerContainer $container) { + public function __construct(LoggerInterface $logger, Coordinator $bootstrapCoordinator, IServerContainer $container) { $this->logger = $logger; $this->bootstrapCoordinator = $bootstrapCoordinator; $this->container = $container; @@ -118,9 +118,8 @@ class InitialStateService implements IInitialStateService { $provider = $this->container->query($initialState->getService()); } catch (QueryException $e) { // Log an continue. We can be fault tolerant here. - $this->logger->logException($e, [ - 'message' => 'Could not load initial state provider dynamically: ' . $e->getMessage(), - 'level' => ILogger::ERROR, + $this->logger->error('Could not load initial state provider dynamically: ' . $e->getMessage(), [ + 'exception' => $e, 'app' => $initialState->getAppId(), ]); continue; -- cgit v1.2.3