diff options
Diffstat (limited to 'lib/private/Log/LogFactory.php')
-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 { |