summaryrefslogtreecommitdiffstats
path: root/lib/private/Server.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2017-01-11 08:14:24 +0100
committerGitHub <noreply@github.com>2017-01-11 08:14:24 +0100
commita90cbb0f094f0f418c0e6e78dcd406d34f7b3bd2 (patch)
tree66e8767a3bc1af9aaff0e6c443b2c8d24bf2d123 /lib/private/Server.php
parent40239decb1b36f1daff53710e01d81e18c24f4fc (diff)
parent7fa063ceca5d78741c47f645c6dfdf65e4be7330 (diff)
downloadnextcloud-server-a90cbb0f094f0f418c0e6e78dcd406d34f7b3bd2.tar.gz
nextcloud-server-a90cbb0f094f0f418c0e6e78dcd406d34f7b3bd2.zip
Merge pull request #2951 from nextcloud/handle-nextcloud-log-type-gracefully
Handle log_type "nextcloud" more gracefully
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r--lib/private/Server.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 6888c492910..d88a687bbc4 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -419,9 +419,8 @@ class Server extends ServerContainer implements IServerContainer {
);
});
$this->registerService('Logger', function (Server $c) {
- $logClass = $c->query('AllConfig')->getSystemValue('log_type', 'file');
- // TODO: Drop backwards compatibility for config in the future
- $logger = 'OC\\Log\\' . ucfirst($logClass=='owncloud' ? 'file' : $logClass);
+ $logType = $c->query('AllConfig')->getSystemValue('log_type', 'file');
+ $logger = Log::getLogClass($logType);
call_user_func(array($logger, 'init'));
return new Log($logger);