diff options
Diffstat (limited to 'lib/private/Log.php')
-rw-r--r-- | lib/private/Log.php | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/private/Log.php b/lib/private/Log.php index 5ba19698612..fddd3593127 100644 --- a/lib/private/Log.php +++ b/lib/private/Log.php @@ -330,18 +330,19 @@ class Log implements ILogger { * @internal */ public static function getLogClass($logType) { - // TODO: Drop backwards compatibility for config in the future switch (strtolower($logType)) { + case 'errorlog': + return \OC\Log\Errorlog::class; + case 'syslog': + return \OC\Log\Syslog::class; + case 'file': + return \OC\Log\File::class; + + // Backwards compatibility for old and fallback for unknown log types case 'owncloud': case 'nextcloud': - $logType = 'file'; + default: + return \OC\Log\File::class; } - $logClass = 'OC\\Log\\' . ucfirst($logType); - - if (!class_exists($logClass)) { - $logClass = \OC\Log\File::class; - } - - return $logClass; } } |