File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Bundle/TwigBundle/Resources/config
Component/HttpKernel/EventListener Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 128128 <tag name =" monolog.logger" channel =" request" />
129129 <argument >%twig.exception_listener.controller%</argument >
130130 <argument type =" service" id =" logger" on-invalid =" null" />
131+ <argument >%twig.exception_listener.http_status_codes_log_level%</argument >
131132 </service >
132133
133134 <service id =" twig.controller.exception" class =" Symfony\Bundle\TwigBundle\Controller\ExceptionController" public =" true" >
Original file line number Diff line number Diff line change @@ -33,10 +33,13 @@ class ExceptionListener implements EventSubscriberInterface
3333 protected $ logger ;
3434 protected $ httpStatusCodeLogLevel = array ();
3535
36- public function __construct ($ controller , LoggerInterface $ logger = null )
36+ public function __construct ($ controller , LoggerInterface $ logger = null , $ httpStatusCodeLogLevel = array () )
3737 {
3838 $ this ->controller = $ controller ;
3939 $ this ->logger = $ logger ;
40+ if ($ httpStatusCodeLogLevel && is_array ($ httpStatusCodeLogLevel )) {
41+ $ this ->httpStatusCodeLogLevel = $ httpStatusCodeLogLevel ;
42+ }
4043 }
4144
4245 public function logKernelException (GetResponseForExceptionEvent $ event )
You can’t perform that action at this time.
0 commit comments