Skip to content

Commit

Permalink
log error when failing to publish to NATS
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulexus committed Jun 27, 2018
1 parent 7f1e92c commit 55296fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ func (s *Server) pingHandler(m *nats.Msg) {
// publish sends a message out over NATS, logging any error
func (s *Server) publish(subject string, msg interface{}) {
if err := s.nats.Publish(subject, msg); err != nil {
s.Log.Warn("failed to publish NATS message", "subject", subject, "data", msg)
s.Log.Warn("failed to publish NATS message", "subject", subject, "data", msg, "error", err)
}
}

Expand Down

0 comments on commit 55296fd

Please sign in to comment.