File tree 2 files changed +5
-1
lines changed
Bundle/TwigBundle/Resources/config
Component/HttpKernel/EventListener
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 128
128
<tag name =" monolog.logger" channel =" request" />
129
129
<argument >%twig.exception_listener.controller%</argument >
130
130
<argument type =" service" id =" logger" on-invalid =" null" />
131
+ <argument >%twig.exception_listener.http_log_levels%</argument >
131
132
</service >
132
133
133
134
<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
33
33
protected $ logger ;
34
34
protected $ httpStatusCodeLogLevel = array ();
35
35
36
- public function __construct ($ controller , LoggerInterface $ logger = null )
36
+ public function __construct ($ controller , LoggerInterface $ logger = null , $ httpStatusCodeLogLevel = array () )
37
37
{
38
38
$ this ->controller = $ controller ;
39
39
$ this ->logger = $ logger ;
40
+ if (is_array ($ this ->httpStatusCodeLogLevel ) && count ($ this ->httpStatusCodeLogLevel )) {
41
+ $ this ->httpStatusCodeLogLevel = $ httpStatusCodeLogLevel ;
42
+ }
40
43
}
41
44
42
45
public function logKernelException (GetResponseForExceptionEvent $ event )
You can’t perform that action at this time.
0 commit comments