@@ -19,7 +19,12 @@ it is broken down.
1919 handlers :
2020 mail :
2121 type : fingers_crossed
22+ # 500 errors are logged at the critical level
2223 action_level : critical
24+ # to also log 400 level errors (but not 404's):
25+ # action_level: error
26+ # excluded_404:
27+ # - ^/
2328 handler : buffered
2429 buffered :
2530 type : buffer
@@ -48,6 +53,12 @@ it is broken down.
4853 type =" fingers_crossed"
4954 action-level =" critical"
5055 handler =" buffered"
56+ <!--
57+ To also log 400 level errors (but not 404' s):
58+ action-level="error"
59+ And add this child inside this monolog:handler
60+ <monolog:excluded-404>^/</monolog:excluded-404>
61+ -->
5162 />
5263 <monolog:handler
5364 name="buffered"
@@ -81,6 +92,11 @@ it is broken down.
8192 ' mail' => array(
8293 ' type' => ' fingers_crossed' ,
8394 ' action_level' => ' critical' ,
95+ // to also log 400 level errors (but not 404' s):
96+ // ' action_level' => 'error',
97+ // 'excluded_404s' => array(
98+ // '^/',
99+ // ),
84100 'handler' => 'buffered',
85101 ),
86102 'buffered' => array(
@@ -108,7 +124,8 @@ setting means that the output is then passed onto the ``buffered`` handler.
108124.. tip ::
109125
110126 If you want both 400 level and 500 level errors to trigger an email,
111- set the ``action_level `` to ``error `` instead of ``critical ``.
127+ set the ``action_level `` to ``error `` instead of ``critical ``. See the
128+ code above for an example.
112129
113130The ``buffered `` handler simply keeps all the messages for a request and
114131then passes them onto the nested handler in one go. If you do not use this
0 commit comments