From 00209b4c7374952f700217ed5b6d821ff63a38ee Mon Sep 17 00:00:00 2001 From: Travis Bischel Date: Wed, 19 Oct 2022 22:05:49 -0600 Subject: [PATCH] kgo: add addr to sasl logs This helps with some issues (#221) and doesn't hurt --- pkg/kgo/broker.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/kgo/broker.go b/pkg/kgo/broker.go index 98c394eb..c340a1c6 100644 --- a/pkg/kgo/broker.go +++ b/pkg/kgo/broker.go @@ -777,7 +777,7 @@ start: } authenticate = req.Version == 1 } - cxn.cl.cfg.logger.Log(LogLevelDebug, "beginning sasl authentication", "broker", logID(cxn.b.meta.NodeID), "mechanism", mechanism.Name(), "authenticate", authenticate) + cxn.cl.cfg.logger.Log(LogLevelDebug, "beginning sasl authentication", "broker", logID(cxn.b.meta.NodeID), "addr", cxn.addr, "mechanism", mechanism.Name(), "authenticate", authenticate) cxn.mechanism = mechanism return cxn.doSasl(authenticate) } @@ -813,7 +813,7 @@ func (cxn *brokerCxn) doSasl(authenticate bool) error { binary.BigEndian.PutUint32(buf, uint32(len(clientWrite))) buf = append(buf, clientWrite...) - cxn.cl.cfg.logger.Log(LogLevelDebug, "issuing raw sasl authenticate", "broker", logID(cxn.b.meta.NodeID), "step", step) + cxn.cl.cfg.logger.Log(LogLevelDebug, "issuing raw sasl authenticate", "broker", logID(cxn.b.meta.NodeID), "addr", cxn.addr, "step", step) _, _, _, _, err = cxn.writeConn(context.Background(), buf, wt, time.Now()) cxn.cl.bufPool.put(buf)