Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[FrameworkBundle][HttpKernel][MonologBridge] Revisit wiring of debug loggers#51284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| publicstaticfunctionconfigureLogger(Logger$logger):void | ||
| { | ||
| if (!\in_array(\PHP_SAPI, ['cli','phpdbg'],true) &&method_exists($logger,'enableDebug')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
why removing this check ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
because the method is always available per composer constraints nowadays
…oggerConfigurator (nicolas-grekas)This PR was merged into the 6.4 branch.Discussion----------[HttpKernel] Fix checking for the runtime mode in DebugLoggerConfigurator| Q | A| ------------- | ---| Branch? | 6.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets | -| License | MIT| Doc PR | -Fixing#51284, my bad. Eating your own dog food works :)Commits-------1836a1e [HttpKernel] Fix checking for the runtime mode in DebugLoggerConfigurator
Replaces#51229
Implements the suggestions from@stof and@Seldaek in#51229 (comment)
It turns our we had almost everything available. This is mostly a matter of wiring.
Symfony\Bridge\Monolog\LoggerAddDebugLogProcessorPass::configureLogger()DebugLoggerConfiguratorto HttpKernel, which wiresDebugProcessorwhen desiredBonus:
$debugto HttpKernel'sLoggerEnableLoggerDebugModePassin favor of the previous