Make sure SystemConfig class can be injected and syslog_tag is fetched properly

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2019-08-12 17:54:27 +02:00
parent fced73aa37
commit 2efb9a7d90
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
2 changed files with 3 additions and 2 deletions

View File

@ -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() {

View File

@ -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());