EkinoNewRelicBundle icon indicating copy to clipboard operation
EkinoNewRelicBundle copied to clipboard

Enabling extension and monolog leads to unexpected errors when no extension

Open PWalkow opened this issue 5 years ago • 1 comments

As in #221 , enabling both monolog and extension leads to MissingExtensionException in NewRelicHandler on a LoggerInterface call.

Minimum configuration:

### ekino_new_relic.yaml
ekino_new_relic:
    enabled: true
    exceptions: true
    deprecations: true
    monolog:
        enabled: true
        level: error

should there be an extra check before loading the monolog handler even if it is not supported by missing extension to avoid playing with the configuration for environments that does not have an extension?

PWalkow avatar Nov 29 '19 09:11 PWalkow

Another problem with the current approach is that you can't disable the bundle via environment variables, cause the check for New Relic extension happens while the bundle is being loaded, and at this moment the environment variables are not resolved yet.

thiagorb avatar Apr 24 '23 07:04 thiagorb