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

Support log-level as an environment variable #1328

Open
eikenb opened this issue Dec 18, 2019 · 3 comments
Open

Support log-level as an environment variable #1328

eikenb opened this issue Dec 18, 2019 · 3 comments

Comments

@eikenb
Copy link
Contributor

eikenb commented Dec 18, 2019

When working on consul-template I find myself switching between log levels quite a bit and having to keep editing scripts or commands. If it supported an environment variable for setting the log-level it would make this much easier.

The cli argument should override the environment variables.

My initial proposed variable name is CONSULT_TEMPLATE_LOG_LEVEL, though that is a bit long.

@sterchelen
Copy link

@eikenb There is already an environment variable for setting the log level.
Look at https://github.com/hashicorp/consul-template/blob/master/config/config.go#L526-L530
You can use CONSUL_TEMPLATE_LOG or CT_LOG...

@sterchelen
Copy link

I propose to remove CT_LOG and add _LEVEL as suffix for CONSUL_TEMPLATE_LOG

@eikenb
Copy link
Contributor Author

eikenb commented Apr 27, 2021

@sterchelen.. Thanks for pointing that out, obviously missed it.

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