Symfony 4.1 excluded_http_codes digitalocean load balancer

I want to exclude load balancer requests from logs in monolog in symfony 4.1. This is current monolog config i have:

            type: 'fingers_crossed'
            channels: ['!security']
            action_level: info
            excluded_http_codes: [403, 404, {200: ['^/ping(.+)', '^/status(.+)', '^/status?q=%2Fstatus', '^']}]
            handler: file
            type: stream
            level: debug
            path: "%kernel.logs_dir%/app.log"
            formatter: MonologFormatterJsonFormatter
            include_stacktraces: true

Unforunately it looks like i can’t make it to exclude those specifics digital ocean requests. They are made with request_uri which is like this Of course this host is not an actual host of my application. Just digitalocean load balancer is making a request with to such endpoint.

Any idea what i can do? Maybe i should add such a route with such host? Could it fix an issue?

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *