diff --git a/cmd/pbm-agent/main.go b/cmd/pbm-agent/main.go index 3818cd5f6..15de1c214 100644 --- a/cmd/pbm-agent/main.go +++ b/cmd/pbm-agent/main.go @@ -68,6 +68,10 @@ func rootCommand() *cobra.Command { return errors.New("required flag " + mongoConnFlag + " not set") } + if !isValidLogLevel(viper.GetString("log.level")) { + return errors.New("invalid log level") + } + return nil }, Run: func(cmd *cobra.Command, args []string) {