-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[MonologBridge] Add ProcessorInterface, enabling autoconfiguration of monolog processors #27801
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
Conversation
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.
👍
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.
In think it deserves a linked PR for the docs.
4.2.0 | ||
----- | ||
|
||
* added `ProcessorInterface`: an optional interface to allow autoconfiguration of monolog processors |
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.
Monolog
namespace Symfony\Bridge\Monolog\Processor; | ||
|
||
/** | ||
* An optional interface to allow autoconfiguration of monolog processors. |
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.
Monolog
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.
fixed
… monolog processors
doc PR added |
Thank you @nicolas-grekas. |
…onfiguration of monolog processors (nicolas-grekas) This PR was merged into the 4.2-dev branch. Discussion ---------- [MonologBridge] Add ProcessorInterface, enabling autoconfiguration of monolog processors | 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#9996 Using this, enabling e.g. TokenProcessor or WebProcessor just needs one line in `services.yaml`: ```yaml services: Symfony\Bridge\Monolog\Processor\TokenProcessor: ~ Symfony\Bridge\Monolog\Processor\WebProcessor: ~ ``` Commits ------- 28a4912 [MonologBridge] Add ProcessorInterface, enabling autoconfiguration of monolog processors
…las-grekas, javiereguiluz) This PR was merged into the master branch. Discussion ---------- Tell about ProcessorInterface in logging/processors Doc for symfony/symfony#27801 Commits ------- ad2bad9 Minor reword 0c9c90f Tell about ProcessorInterface in logging/processors
This PR was merged into the 4.2-dev branch. Discussion ---------- [DI] Allow autoconfiguring bindings | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - I've come up with a case where we will need to inject a different service based on which interfaces a consumer service implements: injecting a different token storage for monolog processor than for everything else. Required in #27801. Commits ------- 7c29977 [DI] Allow autoconfiguring bindings
…rface, enabling autoconfiguration of monolog processors" (nicolas-grekas) This PR was merged into the 4.2-dev branch. Discussion ---------- Revert "feature #27801 [MonologBridge] Add ProcessorInterface, enabling autoconfiguration of monolog processors" This reverts commit f27c3a8, reversing changes made to 9da0454. | Q | A | ------------- | --- | Branch? | 4.2 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - A bridge shouldn't provide interfaces to me so I submitted Seldaek/monolog#1204 instead. This PR reverts the possibility to autoconfigure processors for now, so that it could be moved to the MonologBundle instead. To have TokenProcessor and WebProcessor classes implement the new ProcessorInterface, we could bump the minimum version of monolog. This cannot be done until a new version of it is tagged, so we need to resolve this before tagging 4.2 ourselves. Commits ------- cfc3f25 Revert "feature #27801 [MonologBridge] Add ProcessorInterface, enabling autoconfiguration of monolog processors (nicolas-grekas)"
This PR was merged into the master branch. Discussion ---------- [Monolog] Move ProcessorInterface to Monolog Since symfony/symfony#27801 was reverted in symfony/symfony#28845 and the new plan being to make this interface part of Monolog. Commits ------- 663f2ea [Monolog] Move ProcessorInterface to Monolog
* | ||
* @author Nicolas Grekas <[email protected]> | ||
*/ | ||
interface ProcessorInterface |
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.
Funny, for twig you forced me to add this interface in twig itself.
Why didn't you do the same thing here?
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.
I did, see #28845
This has been reverted and added to Monolog meanwhile :)
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.
Ahah. Thanks
Hello, I'm a bit lost. This PR have been reverted, and some code has been move to monolog. More over the docs has not been reverted symfony/symfony-docs#9996 on https://symfony.com/doc/current/logging/processors.html
But this version does not exist. Finally, This feature does not work. I don't know what is intended here. |
See symfony/monolog-bundle#285 which isn't merged yet but should. |
@lyrixx see symfony/symfony-docs#10796 for the documentation update |
This PR was merged into the 3.x-dev branch. Discussion ---------- Register processors for autoconfiguration Replaces symfony/symfony#27801 (which has been reverted meanwhile) Leverages Seldaek/monolog#1204 Already documented in symfony/symfony-docs#9996 (but doc needs update) Commits ------- 7fdda67 Register processors for autoconfiguration
This PR was merged into the 3.x-dev branch. Discussion ---------- Register processors for autoconfiguration Replaces symfony/symfony#27801 (which has been reverted meanwhile) Leverages Seldaek/monolog#1204 Already documented in symfony/symfony-docs#9996 (but doc needs update) Commits ------- 84c0564 Register processors for autoconfiguration
Using this, enabling e.g. TokenProcessor or WebProcessor just needs one line in
services.yaml
: