Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unwanted logs sent to New Relic #291

Open
pauljura opened this issue Feb 21, 2024 · 0 comments
Open

Unwanted logs sent to New Relic #291

pauljura opened this issue Feb 21, 2024 · 0 comments

Comments

@pauljura
Copy link

I have an API that logs failed requests to a local file. It's implemented by listening to the Response event, and if the status code is not 200 then I log a message to the custom channel. I have it configured in monolog.yaml as follows:

monolog:
    channels: ['unsuccessful_api_requests'] # adding custom channels
    handlers:
        # main (fingers_crossed) -> deduplicate -> mailer
        main:
         ...
         ...
         ...

        # log unsuccessful api requests to file
        unsuccessful_api_requests:
            type: rotating_file
            max_files: 10
            path: "%kernel.logs_dir%/unsuccessful_api_requests.log"
            level: error
            channels: ["unsuccessful_api_requests"]

My ekino_new_relic.yaml file is as follows:

ekino_new_relic:
    enabled: true
    application_name: '%env(APP_NAME)%'
    api_key: "%env(NEWRELIC_API_KEY)%"
    exceptions: true
    deprecations: true
    monolog:
        enabled: false

Even with monolog enabled: false (which should be redundant because the docs say it defaults to false) I see that these log records are still being sent to New Relic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant