You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well, it's not the same log, but I agree one seems useless.
Imho, we need to think about what we want. I would say that we want to log the final response, so terminate could be great if we have access to the response with it's response code.
Description
In our project we noticed that when an error occurs, we have 2 logs
route
and a complete error messageWith some analysis, I found that the fos/rest-bundle that is installed, have an event listener on
kernel.exception
that create a new response (thank to this Symfony component) that triggers a second timekernel.response
.This is not exclusive to the FOS Rest Bundle,
kernel.response
can be triggered every time a response is calculated.A proposed solution would be to change the listener to properly listen on
kernel.terminate
, which is only triggered once.What do you think ?
The text was updated successfully, but these errors were encountered: