Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pkg/cfg/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ func (logging) configure() {
}

// then we weren't configured via command line, check the config file
if !viper.IsSet(Branding.LCName + ".logLevel") {
// or the matching env var. envconfig writes to Cfg.LogLevel directly
// instead of going through viper, so viper.IsSet on its own wasn't
// enough to detect that the user had asked for a specific level via
// e.g. VOUCH_LOGLEVEL. See #540.
if !viper.IsSet(Branding.LCName+".logLevel") && os.Getenv(Branding.UCName+"_LOGLEVEL") == "" {
// then we weren't configured via the config file, set the default
Cfg.LogLevel = Logging.DefaultLogLevel.String()
}
Expand Down