Skip to content

Commit

Permalink
change logging level
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1te909 committed Nov 29, 2022
1 parent 7358907 commit 36e9065
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 36e9065

Please sign in to comment.