diff --git a/logging/monolog_exclude_http_codes.rst b/logging/monolog_exclude_http_codes.rst index 4382b818437..a064370d0c5 100644 --- a/logging/monolog_exclude_http_codes.rst +++ b/logging/monolog_exclude_http_codes.rst @@ -52,12 +52,14 @@ logging these HTTP codes based on the MonologBundle configuration: use Symfony\Config\MonologConfig; return static function (MonologConfig $monolog) { - $monolog->handler('main') + $mainHandler = $monolog->handler('main') // ... ->type('fingers_crossed') ->handler(...) - ->excludedHttpCode([403, 404]) ; + + $mainHandler->excludedHttpCode()->code(403); + $mainHandler->excludedHttpCode()->code(404); }; .. caution::