Skip to content

Commit

Permalink
Handle invalid log level flag value
Browse files Browse the repository at this point in the history
  • Loading branch information
m-Peter committed Oct 18, 2024
1 parent 6db1caf commit 4a7e30f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/run/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ func parseConfigFromFlags() error {
cfg.LogLevel = zerolog.FatalLevel
case "panic":
cfg.LogLevel = zerolog.PanicLevel
default:
return fmt.Errorf("invalid log level: %s", logLevel)

}

if logWriter == "stderr" {
Expand Down

0 comments on commit 4a7e30f

Please sign in to comment.