default level

This commit is contained in:
bui 2023-10-24 10:57:22 +02:00
parent 00e1ffbf58
commit 03650401c5

View file

@ -65,6 +65,11 @@ func (wc *WaapSource) UnmarshalConfig(yamlConfig []byte) error {
return errors.Wrap(err, "Cannot parse waf configuration")
}
if wc.config.LogLevel == nil {
level := new(log.Level)
*level = log.InfoLevel
wc.config.LogLevel = level
}
if wc.config.ListenAddr == "" {
return fmt.Errorf("listen_addr cannot be empty")
}