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 | |
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')
-rw-r--r-- | lib/private/Log/LogFactory.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/private/Log/LogFactory.php b/lib/private/Log/LogFactory.php index c1a4d00ceaa..63f08a32320 100644 --- a/lib/private/Log/LogFactory.php +++ b/lib/private/Log/LogFactory.php @@ -23,6 +23,7 @@ namespace OC\Log; +use OC\AllConfig; use OC\Log; use OCP\ILogger; use OCP\IServerContainer; @@ -60,8 +61,14 @@ class LogFactory implements ILogFactory { } public function getCustomLogger(string $path):ILogger { + $systemConfig = null; + $iconfig = $this->c->getConfig(); + if($iconfig instanceof AllConfig) { + // Log is bound to SystemConfig, but fetches it from \OC::$server if not supplied + $systemConfig = $iconfig->getSystemConfig(); + } $log = $this->buildLogFile($path); - return new Log($log, $this->c->getConfig()); + return new Log($log, $systemConfig); } protected function buildLogFile(string $logFile = ''):File { |