From 7573fa3148cf4ef99075e5373e40b776c0939f17 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 5 Jan 2017 12:47:27 +0100 Subject: Handle log_type "nextcloud" more gracefully Signed-off-by: Joas Schilling --- lib/private/Server.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/private/Server.php') diff --git a/lib/private/Server.php b/lib/private/Server.php index 5bc72e3614f..a2a2eb607fc 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -418,9 +418,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); -- cgit v1.2.3