You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No matter what value VOUCH_LOGLEVEL environment variable is set to, effective value always ends up being info.
Setting it via the config file, on the other hand, does work.
I believe it happens because of the following code in pkg/cfg/logging.go, func (logging) configure() {:
// then we weren't configured via command line, check the config file
if !viper.IsSet(Branding.LCName + ".logLevel") {
// then we weren't configured via the config file, set the default
Cfg.LogLevel = fmt.Sprintf("%s", Logging.DefaultLogLevel)
}
if Cfg.LogLevel != Logging.AtomicLogLevel.Level().String() {
// log.Errorf("Logging.configure() Logging.LogLevel %s Cfg.LogLevel %s", Logging.LogLeveLogging.String(), Cfg.LogLevel)
Logging.setLogLevelString(Cfg.LogLevel)
}
As we can see, Cfg.LogLevel is forced to the default value, unless it is set in the config file, and, if I'm not mistaken, the environment variable never has a chance to take effect.
This was tested with quay.io/vouch/vouch-proxy:0.39. To be honest, I didn't try to set any values other than debug, but I don't think it would've changed anything.
The text was updated successfully, but these errors were encountered:
No matter what value
VOUCH_LOGLEVEL
environment variable is set to, effective value always ends up beinginfo
.Setting it via the config file, on the other hand, does work.
I believe it happens because of the following code in
pkg/cfg/logging.go
,func (logging) configure() {
:As we can see,
Cfg.LogLevel
is forced to the default value, unless it is set in the config file, and, if I'm not mistaken, the environment variable never has a chance to take effect.This was tested with
quay.io/vouch/vouch-proxy:0.39
. To be honest, I didn't try to set any values other thandebug
, but I don't think it would've changed anything.The text was updated successfully, but these errors were encountered: