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

Django log levels are ignored by core agent #510

Closed
sjamaan opened this issue Apr 2, 2020 · 3 comments · Fixed by #512
Closed

Django log levels are ignored by core agent #510

sjamaan opened this issue Apr 2, 2020 · 3 comments · Fixed by #512

Comments

@sjamaan
Copy link

sjamaan commented Apr 2, 2020

No matter what I did to the Django log levels, I kept getting this message when running Django management tasks:

[2020-04-02T09:36:06][core_agent][INFO] Initializing logger with log level: Info

This is super annoying, because this causes programs in my crontab to start sending out lots of e-mails because previously quiet tasks would now start producing output.

After a lot of trial and error, I figured out that you can set SCOUT_LOG_LEVEL in Django settings to suppress this message.

This really should be fixed so the agent also honors the Django logging settings, or at least documented under the logging section in the Python documentation. It's really non-obvious that this the agent is a separate thing which ignores the Django logging settings.

@adamchainz
Copy link
Contributor

Hi @sjamaan

Sorry about this. The core agent shouldn't ened to restart with every program in your crontab.

The variable to set is SCOUT_CORE_AGENT_LOG_LEVEL - SCOUT_LOG_LEVEL is the deprecated alias (it invites further confusion with Python log levels). See https://docs.scoutapm.com/#python-configuration .

Agree it would be good to have the core agent respect log silencing, or not forward its output to the Django process. I'll chat with the core agent developers and investigate this to see what we can do.

Thanks,

Adam

@adamchainz
Copy link
Contributor

@sjamaan the fix has been released in 2.14.0, please upgrade :)

@sjamaan
Copy link
Author

sjamaan commented Apr 8, 2020

Cool, thanks. We'll upgrade on the next deploy

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

Successfully merging a pull request may close this issue.

2 participants