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

Expose logging settings through CLI and environment #22

Open
ihumphrey opened this issue Feb 10, 2020 · 1 comment
Open

Expose logging settings through CLI and environment #22

ihumphrey opened this issue Feb 10, 2020 · 1 comment

Comments

@ihumphrey
Copy link
Contributor

It would be nice to be able to configure the logging options via command line args and/or environment variables. For example, we could provide --file-log-level and --stream-log-level as command line args for configuring the logging levels.

If a setting has a command line arg defined, use that (highest priority).
If a setting has an environment var defined and no command line arg, use the env var.
If no env var is set and no command line arg is passed, use the default value.

It may be worth investigating collections.ChainMap for this.

@danielballan
Copy link
Contributor

It might also be useful to look at how tornado's settings functionality works. (I don't know and can't speak to the implementation at all, but it seems to work well.)

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

No branches or pull requests

2 participants