Explorar o código

fix plugins logging in right level (#990)

he2ss %!s(int64=3) %!d(string=hai) anos
pai
achega
fb308d5596
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      pkg/csplugin/broker.go

+ 3 - 0
pkg/csplugin/broker.go

@@ -251,6 +251,9 @@ func (pb *PluginBroker) loadNotificationPlugin(name string, binaryPath string) (
 	if err != nil {
 		return nil, err
 	}
+	// We set the highest level to permit plugins to set their own log level
+	// without that, crowdsec log level is controlling plugins level
+	l.SetLevel(log.TraceLevel)
 	logger := NewHCLogAdapter(l, "")
 	c := plugin.NewClient(&plugin.ClientConfig{
 		HandshakeConfig:  handshake,