change logging level
This commit is contained in:
parent
7358907b3c
commit
36e9065474
@ -408,16 +408,16 @@ func (a *Agent) setupNatsOptions() []nats.Option {
|
||||
opts = append(opts, nats.ReconnectBufSize(-1))
|
||||
opts = append(opts, nats.ProxyPath(a.NatsProxyPath))
|
||||
opts = append(opts, nats.DisconnectErrHandler(func(nc *nats.Conn, err error) {
|
||||
a.Logger.Debugln("NATS disconnected:", err)
|
||||
a.Logger.Debugf("%+v\n", nc.Statistics)
|
||||
a.Logger.Errorln("NATS disconnected:", err)
|
||||
a.Logger.Errorf("%+v\n", nc.Statistics)
|
||||
}))
|
||||
opts = append(opts, nats.ReconnectHandler(func(nc *nats.Conn) {
|
||||
a.Logger.Debugln("NATS reconnected")
|
||||
a.Logger.Debugf("%+v\n", nc.Statistics)
|
||||
a.Logger.Infoln("NATS reconnected")
|
||||
a.Logger.Infof("%+v\n", nc.Statistics)
|
||||
}))
|
||||
opts = append(opts, nats.ErrorHandler(func(nc *nats.Conn, sub *nats.Subscription, err error) {
|
||||
a.Logger.Debugln("NATS error:", err)
|
||||
a.Logger.Debugf("%+v\n", sub)
|
||||
a.Logger.Errorln("NATS error:", err)
|
||||
a.Logger.Errorf("%+v\n", sub)
|
||||
}))
|
||||
return opts
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user