@@ -28,8 +28,7 @@ it is broken down.
28
28
action_level : critical
29
29
# to also log 400 level errors (but not 404's):
30
30
# action_level: error
31
- # excluded_404s:
32
- # - ^/
31
+ # excluded_http_codes: [404]
33
32
handler : deduplicated
34
33
deduplicated :
35
34
type : deduplication
@@ -62,7 +61,7 @@ it is broken down.
62
61
to also log 400 level errors (but not 404's):
63
62
action-level="error"
64
63
And add this child inside this monolog:handler
65
- <monolog:excluded-404>^/</monolog:excluded- 404>
64
+ <monolog:excluded-http-code code=" 404"/ >
66
65
-->
67
66
<monolog : handler
68
67
name =" main"
@@ -102,16 +101,15 @@ it is broken down.
102
101
use Symfony\Config\MonologConfig;
103
102
104
103
return static function (MonologConfig $monolog) {
105
- $monolog->handler('main')
104
+ $mainHandler = $ monolog->handler('main')
106
105
->type('fingers_crossed')
107
106
// 500 errors are logged at the critical level
108
107
->actionLevel('critical')
109
- // to also log 400 level errors (but not 404's):
110
- // ->actionLevel('error')
111
- // ->excluded404s(['^/'])
112
-
113
108
->handler('deduplicated')
114
109
;
110
+ // To also log 400 level errors, set the above action level to `error`.
111
+ // To exclude 404's, add:
112
+ $mainHandler->excludedHttpCode()->code(404);
115
113
116
114
$monolog->handler('deduplicated')
117
115
->type('deduplication')
0 commit comments