bugsnag + symfony – report notices and deprecations

We used Bugsnag to aggregate and report issues on a symfony 4 project. All works well except the fact that notices are logged but not sent into bugsnag.

From what I see in code for the bugsnag listener to “hear” that something bad occurred it has to be over the monolog action_level tier. This means that in order to see notices in bugsnag I would have to set the action level to “notice” like below:

monolog:
handlers:
    main:
        type: fingers_crossed
        action_level: critical
        handler: deduplicated

The problem with this is that if I set that to notice, each time a notice occurs the user will see a 500 page. That is correct but not exactly a desired result.

What I would like to achieve is to keep current action_level to critical (so the user is not traumatized by 500 pages because some 3rd party deprecated something), but to send everything (including warnings, notices and deprecations) to bugsnag (so our developers see them and fix them). Any idea how to do that?

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

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