Skip to content

Commit

Permalink
chore: add some debug logging for NATS connect errors
Browse files Browse the repository at this point in the history
  • Loading branch information
smlx committed Mar 10, 2022
1 parent e4df813 commit ac6edf3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/serviceapi/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ func ServeNATS(ctx context.Context, stop context.CancelFunc, log *zap.Logger,
// pass credentials
nats.UserInfo(natsUser, natsPass))
if err != nil {
log.Debug("NATS connect error", zap.Error(err),
zap.String("user", natsUser), zap.String("pass", natsPass))
return fmt.Errorf("couldn't connect to NATS server: %v", err)
}
c, err := nats.NewEncodedConn(nc, "json")
Expand Down

0 comments on commit ac6edf3

Please sign in to comment.