rocketmq-client-go 包 会默认将Info级别的日志打印到标准输出进入supervisor
解决这一问题的办法有两个:
1.声明客户端时将rocketmq的log覆盖为项目log 并且指定日志打印级别
import "github.com/apache/rocketmq-client-go/v2/rlog"var defaultLoggeronce sync.once// InitLogger 初始化日志func InitLogger(zlog *log.Zlog) { defaultLoggerOnce.Do(func() { defaultLogger = newLogger(zlog, log.WarnLevel) rlog.SetLogger(defaultLogger) })}
2.配置环境变量设定rocketmq的log打印级别:
export ROCKETMQ_GO_LOG_LEVEL=error