CR fixes
Some checks failed
continuous-integration / ci-go-lint (push) Failing after 10m18s
continuous-integration / ci-markdown-lint (push) Failing after 4m20s
continuous-integration / ci-unit-tests (push) Failing after 7m22s
continuous-integration / ci-build (push) Failing after 7m18s
continuous-integration / ci-docker-build (push) Failing after 11m9s

This commit is contained in:
Sotirios Mantziaris 2025-01-09 21:03:15 +02:00 committed by Manuel Rüger
parent f25d8876fc
commit c63201159d

14
main.go
View File

@ -610,18 +610,18 @@ func configFilePath() string {
func setLogLevel(cCtx *cli.Context) error { func setLogLevel(cCtx *cli.Context) error {
logLevel := cCtx.String("log-level") logLevel := cCtx.String("log-level")
switch logLevel { switch strings.ToUpper(logLevel) {
case "TRACE": case lorg.LevelTrace.String():
log.SetLevel(lorg.LevelTrace) log.SetLevel(lorg.LevelTrace)
case "DEBUG": case lorg.LevelDebug.String():
log.SetLevel(lorg.LevelDebug) log.SetLevel(lorg.LevelDebug)
case "INFO": case lorg.LevelInfo.String():
log.SetLevel(lorg.LevelInfo) log.SetLevel(lorg.LevelInfo)
case "WARNING": case lorg.LevelWarning.String():
log.SetLevel(lorg.LevelWarning) log.SetLevel(lorg.LevelWarning)
case "ERROR": case lorg.LevelError.String():
log.SetLevel(lorg.LevelError) log.SetLevel(lorg.LevelError)
case "FATAL": case lorg.LevelFatal.String():
log.SetLevel(lorg.LevelFatal) log.SetLevel(lorg.LevelFatal)
default: default:
return fmt.Errorf("unknown log level: %s", logLevel) return fmt.Errorf("unknown log level: %s", logLevel)