8000 [FrameworkBundle][HttpKernel][MonologBridge] Revisit wiring of debug loggers by nicolas-grekas · Pull Request #51284 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2023

Conversation

nicolas-grekas
Copy link
Member
Q A
Branch? 6.4
Bug fix? no
New feature? yes
Deprecations? yes
Tickets -
License MIT
Doc PR -

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.

  • Deprecate class Symfony\Bridge\Monolog\Logger
  • Deprecate AddDebugLogProcessorPass::configureLogger()
  • Add DebugLoggerConfigurator to HttpKernel, which wires DebugProcessor when desired

Bonus:

  • Add argument $debug to HttpKernel's Logger
  • Deprecate EnableLoggerDebugModePass in favor of the previous

carsonbot added this to the 6.4 milestone Aug 5, 2023
@carsonbot carsonbot changed the title [HttpKernel][MonologBridge][FrameworkBundle] Revisit wiring of debug loggers [FrameworkBundle][HttpKernel][MonologBridge] Revisit wiring of debug loggers Aug 5, 2023
@@ -32,7 +37,7 @@ public function process(ContainerBuilder $container): void

public static function configureLogger(Logger $logger): void
{
if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && method_exists($logger, 'enableDebug')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why removing this check ?

Copy link
Member Author

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

nicolas-grekas added a commit that referenced this pull request Aug 23, 2023
…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
This was referenced Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0