8000 Address https://github.com/symfony/symfony/pull/47483#discussion_r997… · symfony/symfony@c1a66d6 · GitHub
[go: up one dir, main page]

Skip to content

Commit c1a66d6

Browse files
committed
1 parent ef54bff commit c1a66d6

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddDebugLogProcessorPass.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,15 @@ public function process(ContainerBuilder $container)
4949

5050
public static function configureMonologLogger(mixed $logger)
5151
{
52-
if (\is_object($logger) && method_exists($logger, 'removeDebugLogger') && self::shouldDisableDebug()) {
52+
if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && \is_object($logger) && method_exists($logger, 'removeDebugLogger')) {
5353
$logger->removeDebugLogger();
5454
}
5555
}
5656

5757
public static function configureHttpKernelLogger(Logger $logger)
5858
{
59-
if (self::shouldDisableDebug()) {
59+
if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) {
6060
$logger->enableDebug(false);
6161
}
6262
}
63-
64-
private static function shouldDisableDebug(): bool
65-
{
66-
return \in_array(\PHP_SAPI, ['cli', 'phpdbg'], true);
67-
}
6863
}

0 commit comments

Comments
 (0)
0