Skip to content

Commit

Permalink
Merge pull request #6895 from nupplaphil/issue/legacy_loglevel
Browse files Browse the repository at this point in the history
Fix Legacy LogLevel mapping
  • Loading branch information
MrPetovan authored Mar 17, 2019
2 parents 5254b36 + 3d9ed7d commit 39fc98f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Factory/LoggerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public static function create($channel, Configuration $config, Profiler $profile

$introspection = new Introspection(self::$ignoreClassList);
$level = $config->get('system', 'loglevel');
$loglevel = self::mapLegacyConfigDebugLevel((string)$level);

switch ($config->get('system', 'logger_config', 'stream')) {

Expand All @@ -70,18 +71,17 @@ public static function create($channel, Configuration $config, Profiler $profile

$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;
}

Expand Down

0 comments on commit 39fc98f

Please sign in to comment.