diff --git a/cliv2/cmd/cliv2/main.go b/cliv2/cmd/cliv2/main.go index 883ef13a1c..ad64396b0c 100644 --- a/cliv2/cmd/cliv2/main.go +++ b/cliv2/cmd/cliv2/main.go @@ -91,7 +91,7 @@ func initApplicationConfiguration(config configuration.Configuration) { config.AddAlternativeKeys(configuration.ANALYTICS_DISABLED, []string{strings.ToLower(constants.SNYK_ANALYTICS_DISABLED_ENV), "snyk_cfg_disable_analytics", "disable-analytics", "disable_analytics"}) config.AddAlternativeKeys(configuration.ORGANIZATION, []string{"snyk_cfg_org"}) config.AddAlternativeKeys(configuration.PREVIEW_FEATURES_ENABLED, []string{"snyk_preview"}) - config.AddAlternativeKeys("snyk_log_level", []string{debug_level_flag}) + config.AddAlternativeKeys(configuration.LOG_LEVEL, []string{debug_level_flag}) // if the CONFIG_KEY_OAUTH_TOKEN is specified as env var, we don't apply any additional logic _, ok := os.LookupEnv(auth.CONFIG_KEY_OAUTH_TOKEN) diff --git a/cliv2/internal/debug/debug.go b/cliv2/internal/debug/debug.go index acf42a7269..c7f8c4578b 100644 --- a/cliv2/internal/debug/debug.go +++ b/cliv2/internal/debug/debug.go @@ -11,7 +11,7 @@ func GetDebugLevel(config configuration.Configuration) zerolog.Level { if config.GetBool(configuration.DEBUG) { loglevel = zerolog.DebugLevel - if loglevelString := config.GetString("snyk_log_level"); loglevelString != "" { + if loglevelString := config.GetString(configuration.LOG_LEVEL); loglevelString != "" { var err error loglevel, err = zerolog.ParseLevel(loglevelString) if err != nil {