-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[WebProfilerBundle] add extra data to logs panel #54445
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
base: 7.3
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,16 @@ public function __construct(callable $processor, ?bool $enable = null) | |
public function pushDebugLogger(Logger $logger): void | ||
{ | ||
if ($this->processor) { | ||
$processors = $logger->getProcessors(); | ||
while ([] !== $logger->getProcessors()) { | ||
$logger->popProcessor(); | ||
} | ||
|
||
// Ensure the DebugLogger is the first processor as Monolog add processors in reverse order | ||
$logger->pushProcessor($this->processor); | ||
foreach ($processors as $processor) { | ||
$logger->pushProcessor($processor); | ||
} | ||
Comment on lines
+38
to
+42
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For me this would deserve its own PR.. as this one only says "add extra data" and not "changes the order of procesors" :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed, that's why I'm not 100% sure about this change. But if processors are left as is, Do you see another way to do so ? Working on |
||
} | ||
} | ||
|
||
|
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.
Really not sure about this. Adding tag priority like suggested here symfony/monolog-bundle#455 might help