浏览代码

fix plugins logging in right level (#990)

he2ss 3 年之前
父节点
当前提交
fb308d5596
共有 1 个文件被更改,包括 3 次插入0 次删除
  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,