-
Notifications
You must be signed in to change notification settings - Fork 42
Added Logging for SubscriberNotififierMiddleware #35
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
@matthiasnoback Is this the right way to do this? |
@ruudk Thanks for suggesting this addition - it's a really useful one. Instead of solving this with an extra class, I would have liked to be able to solve it with decoration. However, that's impossible, since you need to add log messages before and after Since In the SymfonyBridge we can make the extra argument configurable. |
I'll create a PR soon :) |
I'm wondering. Why is there no |
If an event subscriber requires a database transaction, then it's intending to make a persistent change, which is exactly what commands are used for ;) So in that case, just create a new command, and let the command bus handle it. |
@matthiasnoback I changed it a bit so that |
Ah, well, maybe I wasn't clear: my idea was not to extend the existing class, but just to add logging to the existing |
b4a41b0
to
c0e276e
Compare
@matthiasnoback Voila! Ready? :) |
Nice work! |
Added Logging for SubscriberNotififierMiddleware
I merged the code, but I know realize that there should be something in the docs about this as well - could you please add a note about it? Would you also like to work on a PR for the bundle? |
I'll take care of it! |
Currently, there is no way to know which Subscribers have been called.
This pull request adds support for logging inside a copy of
NotifiesMessageSubscribersMiddleware
.To enable this you'll need to add the following to
event_bus_logging.yml
: