summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-04-19 14:06:34 +0200
committerJoas Schilling <coding@schilljs.com>2021-04-27 14:34:32 +0200
commitdf47445c014b83d8400bada6dad53d26d24fd803 (patch)
treec1b46093f33a84209a7b037647888703b31b2e82 /lib
parent56ae87c281d2f54b23f98acf0e138d8e72196a06 (diff)
downloadnextcloud-server-df47445c014b83d8400bada6dad53d26d24fd803.tar.gz
nextcloud-server-df47445c014b83d8400bada6dad53d26d24fd803.zip
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/AppFramework/Bootstrap/Coordinator.php9
-rw-r--r--lib/private/AppFramework/DependencyInjection/DIContainer.php2
-rw-r--r--lib/private/Server.php9
-rw-r--r--lib/private/legacy/OC_Util.php6
4 files changed, 13 insertions, 13 deletions
diff --git a/lib/private/AppFramework/Bootstrap/Coordinator.php b/lib/private/AppFramework/Bootstrap/Coordinator.php
index 627618f04fa..33b02c0291f 100644
--- a/lib/private/AppFramework/Bootstrap/Coordinator.php
+++ b/lib/private/AppFramework/Bootstrap/Coordinator.php
@@ -175,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,
]);
}
}
diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php
index 7395be703d3..db4f3d2c075 100644
--- a/lib/private/AppFramework/DependencyInjection/DIContainer.php
+++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php
@@ -241,7 +241,7 @@ class DIContainer extends SimpleContainer implements IAppContainer {
$c->get(IControllerMethodReflector::class),
$c->get(INavigationManager::class),
$c->get(IURLGenerator::class),
- $server->query(ILogger::class),
+ $server->get(LoggerInterface::class),
$c->get('AppName'),
$server->getUserSession()->isLoggedIn(),
$this->getUserId() !== null && $server->getGroupManager()->isAdmin($this->getUserId()),
diff --git a/lib/private/Server.php b/lib/private/Server.php
index c09ec0a8e18..f7eaf9f3591 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -145,6 +145,7 @@ use OC\Template\JSCombiner;
use OCA\Theming\ImageManager;
use OCA\Theming\ThemingDefaults;
use OCA\Theming\Util;
+use OCA\WorkflowEngine\Service\Logger;
use OCP\Accounts\IAccountManager;
use OCP\App\IAppManager;
use OCP\Authentication\LoginCredentials\IStore;
@@ -731,7 +732,7 @@ class Server extends ServerContainer implements IServerContainer {
$c->get(\OC\User\Manager::class),
$c->getAppDataDir('avatar'),
$c->getL10N('lib'),
- $c->get(ILogger::class),
+ $c->get(LoggerInterface::class),
$c->get(\OCP\IConfig::class),
$c->get(IAccountManager::class),
$c->get(KnownUserService::class)
@@ -877,7 +878,7 @@ class Server extends ServerContainer implements IServerContainer {
$c->get(IGroupManager::class),
$c->get(ICacheFactory::class),
$c->get(SymfonyAdapter::class),
- $c->get(ILogger::class)
+ $c->get(LoggerInterface::class)
);
});
/** @deprecated 19.0.0 */
@@ -1091,7 +1092,7 @@ class Server extends ServerContainer implements IServerContainer {
$this->registerDeprecatedAlias('NotificationManager', \OCP\Notification\IManager::class);
$this->registerService(CapabilitiesManager::class, function (ContainerInterface $c) {
- $manager = new CapabilitiesManager($c->get(ILogger::class));
+ $manager = new CapabilitiesManager($c->get(LoggerInterface::class));
$manager->registerCapability(function () use ($c) {
return new \OC\OCS\CoreCapabilities($c->get(\OCP\IConfig::class));
});
@@ -1334,7 +1335,7 @@ class Server extends ServerContainer implements IServerContainer {
$c->get(AppFetcher::class),
$c->get(IClientService::class),
$c->get(ITempManager::class),
- $c->get(ILogger::class),
+ $c->get(LoggerInterface::class),
$c->get(\OCP\IConfig::class),
\OC::$CLI
);
diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php
index f1e88166e97..63eaf303759 100644
--- a/lib/private/legacy/OC_Util.php
+++ b/lib/private/legacy/OC_Util.php
@@ -747,10 +747,10 @@ class OC_Util {
$config,
\OC::$server->get(IniGetWrapper::class),
\OC::$server->getL10N('lib'),
- \OC::$server->query(\OCP\Defaults::class),
- \OC::$server->getLogger(),
+ \OC::$server->get(\OCP\Defaults::class),
+ \OC::$server->get(LoggerInterface::class),
\OC::$server->getSecureRandom(),
- \OC::$server->query(\OC\Installer::class)
+ \OC::$server->get(\OC\Installer::class)
);
$urlGenerator = \OC::$server->getURLGenerator();