Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -1047,19 +1047,6 @@ private function addVerbosityLevelSection(ArrayNodeDefinition $handerNode)
));
}

try {
if (Logger::API === 3) {
$level = Logger::toMonologLevel($level)->value;
} else {
$level = Logger::toMonologLevel(is_numeric($level) ? (int) $level : $level);
}
} catch (\Psr\Log\InvalidArgumentException $e) {
throw new InvalidConfigurationException(sprintf(
'The configured minimum log level "%s" for verbosity "%s" is invalid as it is not defined in Monolog\Logger.',
$level, $verbosity
));
}

$map[constant($verbosityConstant)] = $level;
}

Expand Down
12 changes: 6 additions & 6 deletions Tests/DependencyInjection/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ public function testWithConsoleHandler()
'verbosity_levels' => [
'VERBOSITY_NORMAL' => 'NOTICE',
'verbosity_verbose' => 'info',
'VERBOSITY_very_VERBOSE' => '200'
'VERBOSITY_very_VERBOSE' => '200',
]
]
]
Expand All @@ -289,11 +289,11 @@ public function testWithConsoleHandler()

$this->assertSame('console', $config['handlers']['console']['type']);
$this->assertSame([
OutputInterface::VERBOSITY_NORMAL => Logger::NOTICE,
OutputInterface::VERBOSITY_VERBOSE => Logger::INFO,
OutputInterface::VERBOSITY_VERY_VERBOSE => 200,
OutputInterface::VERBOSITY_QUIET => Logger::ERROR,
OutputInterface::VERBOSITY_DEBUG => Logger::DEBUG
OutputInterface::VERBOSITY_NORMAL => 'NOTICE',
OutputInterface::VERBOSITY_VERBOSE => 'INFO',
OutputInterface::VERBOSITY_VERY_VERBOSE => '200',
OutputInterface::VERBOSITY_QUIET => 'ERROR',
OutputInterface::VERBOSITY_DEBUG => 'DEBUG',
], $config['handlers']['console']['verbosity_levels']);
}

Expand Down