]> git.mxchange.org Git - friendica.git/commitdiff
Fix Legacy LogLevel mapping
authorPhilipp Holzer <admin@philipp.info>
Sun, 17 Mar 2019 09:04:16 +0000 (10:04 +0100)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 23 Mar 2019 03:31:47 +0000 (23:31 -0400)
src/Factory/LoggerFactory.php

index 7bb4e3215d25ad455a31f6707e578697f397c713..cf7888cabb5b9f82e8b4453da297b463efaffc21 100644 (file)
@@ -57,6 +57,7 @@ class LoggerFactory
 
                $introspection = new Introspection(self::$ignoreClassList);
                $level = $config->get('system', 'loglevel');
+               $loglevel = self::mapLegacyConfigDebugLevel((string)$level);
 
                switch ($config->get('system', 'logger_config', 'stream')) {
                        case 'monolog':
@@ -71,18 +72,17 @@ class LoggerFactory
 
                                $stream = $config->get('system', 'logfile');
 
-                               $loglevel = self::mapLegacyConfigDebugLevel((string)$level);
                                static::addStreamHandler($logger, $stream, $loglevel);
                                break;
 
                        case 'syslog':
-                               $logger = new SyslogLogger($channel, $introspection, $level);
+                               $logger = new SyslogLogger($channel, $introspection, $loglevel);
                                break;
 
                        case 'stream':
                        default:
                                $stream = $config->get('system', 'logfile');
-                               $logger = new StreamLogger($channel, $stream, $introspection, $level);
+                               $logger = new StreamLogger($channel, $stream, $introspection, $loglevel);
                                break;
                }