Symfony 4.1 does not log exception error
Hi there, I am using symfony 4.1 with FOSTRestBundle 2.3.1 The error is not logged whenever exception is called. After digging to the code, I saw that while listening to the KernelEvents::EXCEPTION, the http-kernel already decoupled the log outside of onKernelException which called onLogKernelException, while the FOSTRestBundle does not call the onLogKernelException part.
Reference links: https://github.com/symfony/http-kernel/blob/master/EventListener/ExceptionListener.php https://github.com/FriendsOfSymfony/FOSRestBundle/blob/master/EventListener/ExceptionListener.php
Please update the FOSTRestBundle so that it will be compatible with this new Symfony 4.1 change Thanks
Would you like to create a PR?
The Symfony\Component\HttpKernel\EventListener\ExceptionListener::logKernelException() has a priority of 0 while the FOS\RestBundle\EventListener\ExceptionListener::onKernelException() has a priority of -100 and Symfony\Component\HttpKernel\EventListener\ExceptionListener::onKernelException() has a priority of -128. So the logKernelException should be always called.
What am I missing ?