consul-template icon indicating copy to clipboard operation
consul-template copied to clipboard

Support log-level as an environment variable

Open eikenb opened this issue 5 years ago • 3 comments

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 avatar Dec 18 '19 00:12 eikenb

@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 avatar May 16 '20 10:05 sterchelen

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

sterchelen avatar May 16 '20 10:05 sterchelen

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

eikenb avatar Apr 27 '21 21:04 eikenb