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

Using cmdline switch --debug doesn't affect config #34

Open
derek-keeler opened this issue Feb 22, 2021 · 1 comment
Open

Using cmdline switch --debug doesn't affect config #34

derek-keeler opened this issue Feb 22, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@derek-keeler
Copy link
Collaborator

Setting --debug on the command line doesn't change config["log_level"] from info to debug, should it?

@eniklas
Copy link
Owner

eniklas commented Feb 22, 2021

That's not a bug, but while checking I did find a related one. We want to set the log level as early as possible, so we set it as soon as we've got the args and before build_config() is run here.

But, it turns out that log_level in the config file is ignored. Command-line options should override config options, so we should set the log level in this precedence:

  • DEBUG if --debug was used
  • log_level from the config file
  • INFO if neither of those was provided

@eniklas eniklas added the bug Something isn't working label Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants