8000 [FrameworkBundle] framework.php_errors.log now accept a log level · symfony/symfony@5b6a4fe · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 5b6a4fe

Browse files
author
Amrouche Hamza
committed
[FrameworkBundle] framework.php_errors.log now accept a log level
1 parent d65c43b commit 5b6a4fe

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ private function addPhpErrorsSection(ArrayNodeDefinition $rootNode)
833833
->info('PHP errors handling configuration')
834834
->addDefaultsIfNotSet()
835835
->children()
836-
->booleanNode('log')
836+
->scalarNode('log')
837837
->info('Use the app logger instead of the PHP logger for logging PHP errors.')
838838
->defaultValue($this->debug)
839839
->treatNullLike($this->debug)

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,10 +601,14 @@ private function registerDebugConfiguration(array $config, ContainerBuilder $con
601601

602602
$definition = $container->findDefinition('debug.debug_handlers_listener');
603603

604-
if (!$config['log']) {
604+
if (\is_bool($config['log']) && !$config['log']) {
605605
$definition->replaceArgument(1, null);
606606
}
607607

608+
if (\is_int($config['log'])) {
609+
$definition->replaceArgument(4, $config['log']);
610+
}
611+
608612
if (!$config['throw']) {
609613
$container->setParameter('debug.error_handler.throw_at', 0);
610614
}

0 commit comments

Comments
 (0)
0