summaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework/Bootstrap/Coordinator.php
diff options
context:
space:
mode:
authorChristoph Wurst <ChristophWurst@users.noreply.github.com>2021-04-27 15:38:12 +0200
committerGitHub <noreply@github.com>2021-04-27 15:38:12 +0200
commit99f0b104216618625114d6dc314598dc294f080d (patch)
tree5f788797751a39248cdf07a3803898ccbdb9c22c /lib/private/AppFramework/Bootstrap/Coordinator.php
parent48c50277a92b3b37fb4a9a9e7e20a487649b99db (diff)
parent2d75868935c7eedc5f94e63a45a27875e19053dc (diff)
downloadnextcloud-server-99f0b104216618625114d6dc314598dc294f080d.tar.gz
nextcloud-server-99f0b104216618625114d6dc314598dc294f080d.zip
Merge pull request #26591 from nextcloud/techdebt/noid/less-ilogger
Less ILogger
Diffstat (limited to 'lib/private/AppFramework/Bootstrap/Coordinator.php')
-rw-r--r--lib/private/AppFramework/Bootstrap/Coordinator.php20
1 files changed, 9 insertions, 11 deletions
diff --git a/lib/private/AppFramework/Bootstrap/Coordinator.php b/lib/private/AppFramework/Bootstrap/Coordinator.php
index 06a17e5242b..33b02c0291f 100644
--- a/lib/private/AppFramework/Bootstrap/Coordinator.php
+++ b/lib/private/AppFramework/Bootstrap/Coordinator.php
@@ -36,8 +36,8 @@ use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\QueryException;
use OCP\Dashboard\IManager;
use OCP\EventDispatcher\IEventDispatcher;
-use OCP\ILogger;
use OCP\IServerContainer;
+use Psr\Log\LoggerInterface;
use Throwable;
use function class_exists;
use function class_implements;
@@ -57,7 +57,7 @@ class Coordinator {
/** @var IEventDispatcher */
private $eventDispatcher;
- /** @var ILogger */
+ /** @var LoggerInterface */
private $logger;
/** @var RegistrationContext|null */
@@ -70,7 +70,7 @@ class Coordinator {
Registry $registry,
IManager $dashboardManager,
IEventDispatcher $eventListener,
- ILogger $logger) {
+ LoggerInterface $logger) {
$this->serverContainer = $container;
$this->registry = $registry;
$this->dashboardManager = $dashboardManager;
@@ -124,9 +124,8 @@ class Coordinator {
try {
$application->register($this->registrationContext->for($appId));
} catch (Throwable $e) {
- $this->logger->logException($e, [
- 'message' => 'Error during app service registration: ' . $e->getMessage(),
- 'level' => ILogger::FATAL,
+ $this->logger->emergency('Error during app service registration: ' . $e->getMessage(), [
+ 'exception' => $e,
]);
}
}
@@ -176,13 +175,12 @@ class Coordinator {
$application->boot($context);
}
} catch (QueryException $e) {
- $this->logger->logException($e, [
- 'message' => "Could not boot $appId" . $e->getMessage(),
+ $this->logger->error("Could not boot $appId" . $e->getMessage(), [
+ 'exception' => $e,
]);
} catch (Throwable $e) {
- $this->logger->logException($e, [
- 'message' => "Could not boot $appId" . $e->getMessage(),
- 'level' => ILogger::FATAL,
+ $this->logger->emergency("Could not boot $appId" . $e->getMessage(), [
+ 'exception' => $e,
]);
}
}