Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 37fe468

Browse files
committed
Enable debug in the configurator
1 parent 0c8604c commit 37fe468

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public static function configureMonologLogger(mixed $logger)
5353

5454
public static function configureHttpKernelLogger(Logger $logger)
5555
{
56-
if (method_exists($logger, 'enableDebug')) {
57-
$logger->enableDebug(!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true));
56+
if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && method_exists($logger, 'enableDebug')) {
57+
$logger->enableDebug();
5858
}
5959
}
6060
}

src/Symfony/Component/HttpKernel/Log/Logger.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ public function __construct(string $minLevel = null, $output = null, callable $f
8484
}
8585
}
8686

87-
public function enableDebug(bool $enable): void
87+
public function enableDebug(): void
8888
{
89-
$this->debug = $enable;
89+
$this->debug = true;
9090
}
9191

9292
public function log($level, $message, array $context = []): void

0 commit comments

Comments
 (0)