From 2efb9a7d90f0464826cbbc1cc39aa96d485dbf88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 12 Aug 2019 17:54:27 +0200 Subject: [PATCH] Make sure SystemConfig class can be injected and syslog_tag is fetched properly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/Log/Syslog.php | 2 +- lib/private/Server.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/private/Log/Syslog.php b/lib/private/Log/Syslog.php index b8fba34d62..fc536fbd7f 100644 --- a/lib/private/Log/Syslog.php +++ b/lib/private/Log/Syslog.php @@ -40,7 +40,7 @@ class Syslog extends LogDetails implements IWriter { public function __construct(SystemConfig $config) { parent::__construct($config); - openlog($config->getSystemValue('syslog_tag', 'Nextcloud'), LOG_PID | LOG_CONS, LOG_USER); + openlog($config->getValue('syslog_tag', 'Nextcloud'), LOG_PID | LOG_CONS, LOG_USER); } public function __destruct() { diff --git a/lib/private/Server.php b/lib/private/Server.php index c25808a9cc..f919e0b4ef 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -449,9 +449,10 @@ class Server extends ServerContainer implements IServerContainer { $this->registerAlias('AllConfig', \OC\AllConfig::class); $this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class); - $this->registerService('SystemConfig', function ($c) use ($config) { + $this->registerService(\OC\SystemConfig::class, function ($c) use ($config) { return new \OC\SystemConfig($config); }); + $this->registerAlias('SystemConfig', \OC\SystemConfig::class); $this->registerService(\OC\AppConfig::class, function (Server $c) { return new \OC\AppConfig($c->getDatabaseConnection());