Browse Source

fix plugins logging in right level (#990)

he2ss 3 years ago
parent
commit
fb308d5596
1 changed files with 3 additions and 0 deletions
  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,