@@ -28,8 +28,7 @@ it is broken down.
2828 action_level : critical
2929 # to also log 400 level errors (but not 404's):
3030 # action_level: error
31- # excluded_404s:
32- # - ^/
31+ # excluded_http_codes: [404]
3332 handler : deduplicated
3433 deduplicated :
3534 type : deduplication
@@ -62,7 +61,7 @@ it is broken down.
6261 to also log 400 level errors (but not 404's):
6362 action-level="error"
6463 And add this child inside this monolog:handler
65- <monolog:excluded-404>^/</monolog:excluded- 404>
64+ <monolog:excluded-http-code code=" 404"/ >
6665 -->
6766 <monolog : handler
6867 name =" main"
@@ -102,17 +101,18 @@ it is broken down.
102101 use Symfony\Config\MonologConfig;
103102
104103 return static function (MonologConfig $monolog) {
105- $monolog->handler('main')
104+ $mainHandler = $ monolog->handler('main')
106105 ->type('fingers_crossed')
107106 // 500 errors are logged at the critical level
108107 ->actionLevel('critical')
109- // to also log 400 level errors (but not 404's) :
108+ // to also log 400 level errors:
110109 // ->actionLevel('error')
111- // ->excluded404s(['^/'])
112-
113110 ->handler('deduplicated')
114111 ;
115112
113+ // add this to exclude 404 errors
114+ // $mainHandler->excludedHttpCode()->code(404);
115+
116116 $monolog->handler('deduplicated')
117117 ->type('deduplication')
118118 ->handler('symfony_mailer');
0 commit comments