Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@trakos
Copy link
Contributor

Documentation supportingsymfony/symfony#28330

@xabbuhxabbuh added the Waiting Code MergeDocs for features pending to be merged labelSep 3, 2018
symfony-splitter pushed a commit to symfony/monolog-bridge that referenced this pull requestMar 17, 2019
…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-------669f6b2726 [MonologBridge] Add monolog processors adding route and command info
fabpot added a commit to symfony/symfony that referenced this pull requestMar 17, 2019
…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
@dmaicher
Copy link
Contributor

Code PR was merged 😊

@OskarStarkOskarStark removed the Waiting Code MergeDocs for features pending to be merged labelApr 6, 2019
@javiereguiluzjaviereguiluz changed the title[WCM] Add documentation on new monolog processorsAdd documentation on new monolog processorsApr 6, 2019
@javiereguiluz
Copy link
Member

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 aversionadded:: 4.3 telling thatRouteProcessor andConsoleCommandProcessors are new.

@OskarStarkOskarStark added the ⭐️ EU-FOSSA Hackathonhttps://symfony.com/blog/the-symfony-and-api-platform-hackathon-is-coming labelApr 6, 2019
@trakos
Copy link
ContributorAuthor

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.

@dbrumann
Copy link
Contributor

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.

wouterj added a commit that referenced this pull requestApr 7, 2019
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#8156EUFOSSACommits-------67f8c2c Adds documentation for monolog processors.
@wouterj
Copy link
Member

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 aversionadded directive telling these processors were introduced in Symfony 4.3.

@trakostrakosforce-pushed themonolog_processors_command_and_route branch fromdf1b10d to3421c6cCompareApril 9, 2019 09:50
@trakos
Copy link
ContributorAuthor

@wouterj thanks, I've updated this PR and added the versionadded directive

@wouterj
Copy link
Member

I like it, thank you Piotr for your quick responses!

@wouterjwouterj merged commit3421c6c intosymfony:masterApr 9, 2019
wouterj added a commit that referenced this pull requestApr 9, 2019
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
@greg0ire
Copy link
Contributor

@trakos hi! Sorry for digging this up. Do you recall whyreset was implemented the way it is? If you have a rabbitMQ consumer and it uses theServiceResetterProcessor,reset will be called after each message, makingConsoleCommandProcessor ineffective quite fast. Thanks in advance.

@trakos
Copy link
ContributorAuthor

@greg0ire wait, what isServiceResetterProcessor? :) I don't recall a class like that in Symfony. Not sure why rabbitMQ consumer would reset log processor?

I don't think you're supposed to be resetting the processor from the outside. I mean, my initial MR did not include publicreset method, but a reviewer suggested making it implementResetInterface to make it clearer. However, it should work fine without resetting from the outside.

@greg0ire
Copy link
Contributor

greg0ire commentedDec 13, 2021
edited
Loading

@trakos sorry,ServiceResetterProcessor is a swarrot processor (nothing to do with Monolog):https://github.com/swarrot/swarrot/blob/master/src/Swarrot/Processor/ServicesResetter/ServicesResetterProcessor.php

It's quite handy when you havefingers_crossed set up, because that way you don't run out of memory trying to store all log messages since the consumer started, you discard them after each message.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@OskarStarkOskarStarkOskarStark approved these changes

+1 more reviewer

@maxheliasmaxheliasmaxhelias approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

⭐️ EU-FOSSA Hackathonhttps://symfony.com/blog/the-symfony-and-api-platform-hackathon-is-comingLoggerStatus: Reviewed

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

10 participants

@trakos@dmaicher@javiereguiluz@dbrumann@wouterj@greg0ire@OskarStark@maxhelias@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp