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

Change default log level from INFO to WARNING #1263

Closed
wants to merge 1 commit into from

Conversation

omry
Copy link
Collaborator

@omry omry commented Jan 4, 2021

Closes #1262.

The default log level for Python apps is WARNING (per Python docs). Hydra no longer sets the log level of the root logger to ensure it does not change this behavior.
This is a breaking change, people relying on the previous behavior can configure the log level on their own side by adding something like this to their config:

hydra:
  job_logging:
    root:
      level: INFO

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 4, 2021
@omry omry force-pushed the no-root-logging-info branch 3 times, most recently from 7078cd6 to 55df8a3 Compare January 4, 2021 20:03
@omry
Copy link
Collaborator Author

omry commented Jan 4, 2021

@JackUrb, thinking about his some more. I think am will not proceed with this change.

Hydra is configuring the logging so you don't have to. The default log level in Python (WARNING) is not very useful in my opinion.
If you would like to control the log level you can do it by overriding the root log log level in hydra/job_logging. You can also do it for individual loggers.

loggers:
  sh:
    level: WARNING

@omry
Copy link
Collaborator Author

omry commented Jan 4, 2021

I am abandoning this.
Hydra is configuring the logging to to something that is useful for the majority of the applications by default.
I think INFO level for the root logger is a useful default.

Applications that does like the default behavior has two options:

  1. Customize the logging configuration to match their needs.
  2. Completely disable the logging configuration (see Implemented disabling logging configuration & added config file #1130 to see how, this will be easier in 1.1)

@omry omry closed this Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug?] Hydra turns on global logging to the info level
2 participants