Merge pull request #6895 from nupplaphil/issue/legacy_loglevel

Fix Legacy LogLevel mapping
This commit is contained in:
Hypolite Petovan 2019-03-17 07:36:06 -04:00 committed by GitHub
commit 39fc98f5f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -55,6 +55,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')) {
@ -70,18 +71,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;
}