diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-04-25 14:57:08 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-04-26 12:10:53 +0200 |
commit | 0e6a3175162a1312c1035c4a2630a26f8c26d561 (patch) | |
tree | 85fb444ff7efdb01f79aa537de542bdd577a9a44 /lib/private/Log.php | |
parent | 69592408c4ef2b891c2d73f704611d2eabe5813a (diff) | |
download | nextcloud-server-0e6a3175162a1312c1035c4a2630a26f8c26d561.tar.gz nextcloud-server-0e6a3175162a1312c1035c4a2630a26f8c26d561.zip |
revert Log's dependency to SystemConfig to work during Installation
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib/private/Log.php')
-rw-r--r-- | lib/private/Log.php | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/private/Log.php b/lib/private/Log.php index 099cc56776b..69705c49e87 100644 --- a/lib/private/Log.php +++ b/lib/private/Log.php @@ -39,7 +39,6 @@ use InterfaSys\LogNormalizer\Normalizer; use OC\Log\ExceptionSerializer; use OCP\Log\IFileBased; -use OCP\IConfig; use OCP\Log\IWriter; use OCP\ILogger; use OCP\Support\CrashReport\IRegistry; @@ -59,7 +58,7 @@ class Log implements ILogger { /** @var IWriter */ private $logger; - /** @var IConfig */ + /** @var SystemConfig */ private $config; /** @var boolean|null cache the result of the log condition check for the request */ @@ -73,14 +72,14 @@ class Log implements ILogger { /** * @param IWriter $logger The logger that should be used - * @param IConfig $config the system config object + * @param SystemConfig $config the system config object * @param Normalizer|null $normalizer * @param IRegistry|null $registry */ - public function __construct(IWriter $logger, IConfig $config = null, $normalizer = null, IRegistry $registry = null) { + public function __construct(IWriter $logger, SystemConfig $config = null, $normalizer = null, IRegistry $registry = null) { // FIXME: Add this for backwards compatibility, should be fixed at some point probably if ($config === null) { - $config = \OC::$server->getConfig(); + $config = \OC::$server->getSystemConfig(); } $this->config = $config; @@ -258,7 +257,7 @@ class Log implements ILogger { } if (isset($context['app'])) { - $logCondition = $this->config->getSystemValue('log.condition', []); + $logCondition = $this->config->getValue('log.condition', []); $app = $context['app']; /** @@ -272,7 +271,7 @@ class Log implements ILogger { } } - return min($this->config->getSystemValue('loglevel', ILogger::WARN), ILogger::FATAL); + return min($this->config->getValue('loglevel', ILogger::WARN), ILogger::FATAL); } /** |