Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[MonologBridge] Add monolog processors adding route and command info#28330
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
[MonologBridge] Add monolog processors adding route and command info#28330
Uh oh!
There was an error while loading.Please reload this page.
Conversation
27f07bc to62ee940Comparelyrixx commentedSep 3, 2018
I like it but I have some comments
|
trakos commentedSep 3, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
The last one is the current one. It pops last entry during "kernel.finish_request". What do you think?
@lyrixx What do you think? |
e6dee3f to803dc25Comparefabpot commentedOct 10, 2018
@lyrixx Can you review the latest version of this PR? Thank you. |
lyrixx left a comment
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.
It seems better. 👏
I left some comments.
Thanks for your work.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bridge/Monolog/Tests/Processor/ConsoleCommandProcessorTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
329933c to228511eComparetrakos commentedOct 12, 2018
Thanks for your feedback@lyrixx . I've updated the changes. In RouteProcessor I've decided to use |
nicolas-grekas commentedNov 10, 2018
meanwhile, ProcessorInterface has been removed from the bridge and added to Monolog directly inSeldaek/monolog#1204 |
trakos commentedNov 10, 2018
Would you like me to create PR in symfony/monolog-bundle registering this classes, or should I wait till some decision is made? |
nicolas-grekas commentedNov 10, 2018
Let's first finish this one :) |
lyrixx left a comment
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.
LGTM except one tiny comment
Uh oh!
There was an error while loading.Please reload this page.
ac92e84 tod331569Comparetrakos commentedNov 13, 2018
@lyrixx thanks, I've made the change. I've also removed extending ProcessorInterface, since it's no longer there. It should be ready now. |
lyrixx commentedMar 16, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
let's merge this one (except for native English, I can not tell) |
e17ae9a to669f6b2Comparefabpot commentedMar 17, 2019
Thank you@trakos. |
…d command info (trakos)This PR was squashed before being merged into the 4.3-dev branch (closes#28330).Discussion----------[MonologBridge] Add monolog processors adding route and command info| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets || License | MIT| Doc PR |symfony/symfony-docs#10244This PR adds two simple processors that add context to every log entry.RouteProcessor adds routing information:`app.INFO: Some log text {"someContext":"ctx"} {"route":{"controller":"App\\Controller\\SomeController::number","route":"index","route_params":[]}`ConsoleCommandProcessors adds current command information:`app.INFO: Some log text {"someContext":"ctx"} {"command":{"name":"app:some-command","arguments":{"command":"app:some-command","some-argument":10}}}`For ConsoleCommandProcessor I've decided against including command options by default, because there's a lot of default ones:`"options":{"help":false,"quiet":false,"verbose":false,"version":false,"ansi":false,"no-ansi":false,"no-interaction":false,"env":"dev","no-debug":false}`. This behavior can be changed with a constructor argument.Commits-------669f6b2 [MonologBridge] Add monolog processors adding route and command info
This PR was merged into the master branch.Discussion----------Add documentation on new monolog processorsDocumentation supportingsymfony/symfony#28330Commits-------3421c6c [MonologBridge] Add documentation on new processors
Uh oh!
There was an error while loading.Please reload this page.
This PR adds two simple processors that add context to every log entry.
RouteProcessor adds routing information:
app.INFO: Some log text {"someContext":"ctx"} {"route":{"controller":"App\\Controller\\SomeController::number","route":"index","route_params":[]}ConsoleCommandProcessors adds current command information:
app.INFO: Some log text {"someContext":"ctx"} {"command":{"name":"app:some-command","arguments":{"command":"app:some-command","some-argument":10}}}For ConsoleCommandProcessor I've decided against including command options by default, because there's a lot of default ones:
"options":{"help":false,"quiet":false,"verbose":false,"version":false,"ansi":false,"no-ansi":false,"no-interaction":false,"env":"dev","no-debug":false}. This behavior can be changed with a constructor argument.