-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpKernel] Outdated DebugLoggerInterface::getLogs PHPDoc #47396
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
Labels
Comments
I guess we forgot to update the phpdoc of the interface at some point. |
Okay I can submit a PR against 5.4 then 👍 |
@MatTheCat please do |
Just saw |
Hm at this point I have three questions about
Poke @javiereguiluz 👋 |
This was referenced Sep 3, 2022
fabpot
added a commit
that referenced
this issue
Sep 13, 2022
… (MatTheCat) This PR was squashed before being merged into the 6.2 branch. Discussion ---------- [HttpKernel] Update DebugLoggerInterface::getLogs PHPDoc | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Fix #47396 | License | MIT | Doc PR | N/A Commits ------- ba39e60 [HttpKernel] Update DebugLoggerInterface::getLogs PHPDoc
fabpot
added a commit
that referenced
this issue
Oct 20, 2022
…e (MatTheCat) This PR was squashed before being merged into the 6.2 branch. Discussion ---------- [HttpKernel] Make Logger implement DebugLoggerInterface | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | N/A When starting a new project from a skeleton I was surprised not to see any log in the profiler and error pages. Turns out this depends of the logger implementing `DebugLoggerInterface` but AFAIK this only happen in Monolog’s bridge. Given the API makes it weird to implement it in userland (see #47396) would it make sense to provide one by default? Commits ------- 3be04ed [HttpKernel] Make Logger implement DebugLoggerInterface
symfony-splitter
pushed a commit
to symfony/http-kernel
that referenced
this issue
Oct 20, 2022
…e (MatTheCat) This PR was squashed before being merged into the 6.2 branch. Discussion ---------- [HttpKernel] Make Logger implement DebugLoggerInterface | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | N/A When starting a new project from a skeleton I was surprised not to see any log in the profiler and error pages. Turns out this depends of the logger implementing `DebugLoggerInterface` but AFAIK this only happen in Monolog’s bridge. Given the API makes it weird to implement it in userland (see symfony/symfony#47396) would it make sense to provide one by default? Commits ------- 3be04eddaa [HttpKernel] Make Logger implement DebugLoggerInterface
symfony-splitter
pushed a commit
to symfony/framework-bundle
that referenced
this issue
Oct 20, 2022
…e (MatTheCat) This PR was squashed before being merged into the 6.2 branch. Discussion ---------- [HttpKernel] Make Logger implement DebugLoggerInterface | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | N/A When starting a new project from a skeleton I was surprised not to see any log in the profiler and error pages. Turns out this depends of the logger implementing `DebugLoggerInterface` but AFAIK this only happen in Monolog’s bridge. Given the API makes it weird to implement it in userland (see symfony/symfony#47396) would it make sense to provide one by default? Commits ------- 3be04eddaa [HttpKernel] Make Logger implement DebugLoggerInterface
symfony-splitter
pushed a commit
to symfony/framework-bundle
that referenced
this issue
Jul 28, 2023
…e (MatTheCat) This PR was squashed before being merged into the 6.2 branch. Discussion ---------- [HttpKernel] Make Logger implement DebugLoggerInterface | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | N/A When starting a new project from a skeleton I was surprised not to see any log in the profiler and error pages. Turns out this depends of the logger implementing `DebugLoggerInterface` but AFAIK this only happen in Monolog’s bridge. Given the API makes it weird to implement it in userland (see symfony/symfony#47396) would it make sense to provide one by default? Commits ------- 3be04eddaa [HttpKernel] Make Logger implement DebugLoggerInterface
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Symfony version(s) affected
5.4, 6
Description
While trying to implement a
DebugLoggerInterface
around HttpKernel’sLogger
I read the following:symfony/src/Symfony/Component/HttpKernel/Log/DebugLoggerInterface.php
Lines 26 to 28 in cdd1c08
But it seems that since #42195 the
LoggerDataCollector
will expect the keyschannel
context
message
priority
priorityName
timestamp_rfc3339
So
timestamp
is not neededcontext
is not optionaltimestamp_rfc3339
andchannel
are mandatoryIt seems to me
DebugLoggerInterface
is almost exclusively used by theLoggerDataCollector
so I guess the keys should match.How to reproduce
Decorate HttpKernel’s logger to implement
DebugLoggerInterface
:then access the profiler’s logger panel. It will crash.
Possible Solution
Update mandatory keys to be used by the
LoggerDataCollector
.Additional Context
No response
The text was updated successfully, but these errors were encountered: