-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add documentation on new monolog processors #10244
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
Add documentation on new monolog processors #10244
Conversation
…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#10244 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. Commits ------- 669f6b2726 [MonologBridge] Add monolog processors adding route and command info
…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#10244 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. Commits ------- 669f6b2 [MonologBridge] Add monolog processors adding route and command info
Code PR was merged 😊 |
The related code was finally merged a few days ago, so this one is ready to merge. @wouterj if you agree, you could solve the conflict while merging. Also, we must add a |
I've added an issue some time ago: #11185 because I'm not sure how I should fix the conflict. There used to be mentions of WebProcessor and TokenProcessor on this page, but now those mentions seems to have been removed. So now I'm not sure if the built-in processors should be mentioned on this page. |
I think my PR #11328 could help with solving the conflict. I introduced the section for the existing processors outside of the tip. Hopefully you can just add the remaining ones when that PR gets merged. |
This PR was merged into the 3.4 branch. Discussion ---------- Adds documentation for monolog processors. Adds both a short description for existing processors as well as a note for the newly added TokenProcessor added in 3.4. I tried not to interfere with #10244 as this introduces documentation for more processors added in 4.3, so that PR hopefully can build on this one. Replaces #8156 EUFOSSA Commits ------- 67f8c2c Adds documentation for monolog processors.
Fyi, @dbrumann's PR is just merged, so you should be able to rebase this PR and extend the list he added to the docs. Please then also add a |
df1b10d
to
3421c6c
Compare
@wouterj thanks, I've updated this PR and added the versionadded directive |
I like it, thank you Piotr for your quick responses! |
This PR was merged into the master branch. Discussion ---------- Add documentation on new monolog processors Documentation supporting symfony/symfony#28330 Commits ------- 3421c6c [MonologBridge] Add documentation on new processors
@trakos hi! Sorry for digging this up. Do you recall why |
@greg0ire wait, what is I don't think you're supposed to be resetting the processor from the outside. I mean, my initial MR did not include public |
@trakos sorry, It's quite handy when you have |
Documentation supporting symfony/symfony#28330