From a72130fc33a84d0ca60afb20535794efcea05863 Mon Sep 17 00:00:00 2001 From: Amy Gale Ruth Bowersox Date: Thu, 12 Nov 2026 16:18:28 -0700 Subject: [PATCH] bug in log level setup --- logging.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/logging.go b/logging.go index fbebb10..f2979d4 100644 --- a/logging.go +++ b/logging.go @@ -351,10 +351,9 @@ func logScanner(ctx context.Context, lf *amLogFile, done chan bool) { // SetupLogging sets up the log file based on the configuration data. func SetupLogging() func() { loglevel, err := log.ParseLevel(config.GlobalComputedConfig.LogLevel) - if err == nil { - loglevel = log.ErrorLevel - } else { + if err != nil { log.Errorf("default log level not valid: %s (%v)", config.GlobalComputedConfig.LogLevel, err) + loglevel = log.ErrorLevel } if config.GlobalComputedConfig.DebugMode && loglevel != log.TraceLevel { loglevel = log.DebugLevel