@@ -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,17 +101,18 @@ 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) :
108
+ // to also log 400 level errors:
110
109
// ->actionLevel('error')
111
- // ->excluded404s(['^/'])
112
-
113
110
->handler('deduplicated')
114
111
;
115
112
113
+ // add this to exclude 404 errors
114
+ // $mainHandler->excludedHttpCode()->code(404);
115
+
116
116
$monolog->handler('deduplicated')
117
117
->type('deduplication')
118
118
->handler('symfony_mailer');
0 commit comments