consul-template
consul-template copied to clipboard
Support log-level as an environment variable
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.
@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
...
I propose to remove CT_LOG
and add _LEVEL
as suffix for CONSUL_TEMPLATE_LOG
@sterchelen.. Thanks for pointing that out, obviously missed it.