@@ -19,7 +19,12 @@ it is broken down.
19
19
handlers :
20
20
mail :
21
21
type : fingers_crossed
22
+ # 500 errors are logged at the critical level
22
23
action_level : critical
24
+ # to also log 400 level errors (but not 404's):
25
+ # action_level: error
26
+ # excluded_404:
27
+ # - ^/
23
28
handler : buffered
24
29
buffered :
25
30
type : buffer
@@ -48,6 +53,12 @@ it is broken down.
48
53
type =" fingers_crossed"
49
54
action-level =" critical"
50
55
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
+ -->
51
62
/>
52
63
<monolog:handler
53
64
name="buffered"
@@ -81,6 +92,11 @@ it is broken down.
81
92
' mail' => array(
82
93
' type' => ' fingers_crossed' ,
83
94
' action_level' => ' critical' ,
95
+ // to also log 400 level errors (but not 404' s):
96
+ // ' action_level' => 'error',
97
+ // 'excluded_404s' => array(
98
+ // '^/',
99
+ // ),
84
100
'handler' => 'buffered',
85
101
),
86
102
'buffered' => array(
@@ -108,7 +124,8 @@ setting means that the output is then passed onto the ``buffered`` handler.
108
124
.. tip ::
109
125
110
126
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.
112
129
113
130
The ``buffered `` handler simply keeps all the messages for a request and
114
131
then passes them onto the nested handler in one go. If you do not use this
0 commit comments