Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3925

Symfony monolog fingers crossed handler not excluding specified http codes

$
0
0

I am using the fingers crossed handler to buffer log messages until an error occurs. Below is my config:

monolog:
  handlers:
    buffer:
      action_level: error
      excluded_http_codes: [401, 403, 404]
      handler: logger
      type: fingers_crossed
    logger:
      formatter: monolog.formatter.json
      include_stacktraces: true
      level: info
      path: php://stderr
      type: stream

I am finding that exceptions that should match the excluded_http_codes are still being output into my log.

I have dug into the Symfony\Bridge\Monolog\Handler\FingersCrossed\HttpCodeActivationStrategy class and am finding that $this->requestStack->getMasterRequest() is returning null by the time the exception reaches the isHandlerActivated method.

Is there something I am clearly doing wrong?


Viewing all articles
Browse latest Browse all 3925

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>