diff --git a/pkg/kgo/broker.go b/pkg/kgo/broker.go index 368ad52c..c3d5a9a7 100644 --- a/pkg/kgo/broker.go +++ b/pkg/kgo/broker.go @@ -1463,9 +1463,9 @@ func (cxn *brokerCxn) handleResp(pr promisedResp) { if err != nil { if !errors.Is(err, ErrClientClosed) && !errors.Is(err, context.Canceled) { if cxn.successes > 0 || len(cxn.b.cl.cfg.sasls) > 0 { - cxn.b.cl.cfg.logger.Log(LogLevelDebug, "read from broker errored, killing connection", "addr", cxn.b.addr, "broker", logID(cxn.b.meta.NodeID), "successful_reads", cxn.successes, "err", err) + cxn.b.cl.cfg.logger.Log(LogLevelDebug, "read from broker errored, killing connection", "req", kmsg.Key(pr.resp.Key()).Name(), "addr", cxn.b.addr, "broker", logID(cxn.b.meta.NodeID), "successful_reads", cxn.successes, "err", err) } else { - cxn.b.cl.cfg.logger.Log(LogLevelWarn, "read from broker errored, killing connection after 0 successful responses (is SASL missing?)", "addr", cxn.b.addr, "broker", logID(cxn.b.meta.NodeID), "err", err) + cxn.b.cl.cfg.logger.Log(LogLevelWarn, "read from broker errored, killing connection after 0 successful responses (is SASL missing?)", "req", kmsg.Key(pr.resp.Key()).Name(), "addr", cxn.b.addr, "broker", logID(cxn.b.meta.NodeID), "err", err) if err == io.EOF { // specifically avoid checking errors.Is to ensure this is not already wrapped err = &ErrFirstReadEOF{kind: firstReadSASL, err: err} }