Skip to content

Commit 5e57802

Browse files
committed
authmailbox: log full client config on connection check failure
Log the full client config, including the server address, when an authmailbox connection check fails. This ensures the relevant config is visible even if backoff attempts are spread out in the logs or only partial logs are available.
1 parent 40031dc commit 5e57802

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

authmailbox/receive_subscription.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,9 @@ func (s *receiveSubscription) connectServerStream(ctx context.Context,
249249
if backoff > s.cfg.MaxBackoff {
250250
backoff = s.cfg.MaxBackoff
251251
}
252-
log.DebugS(ctx, "Connect failed with error, canceling and "+
253-
"backing off", "backoff", backoff, "err", err)
252+
log.WarnS(ctx, "Connect failed with error, canceling and "+
253+
"backing off", err, "backoff", backoff, "client_config",
254+
s.cfg)
254255

255256
if i < numRetries-1 {
256257
log.InfoS(ctx, "Connection to server failed, will try "+
@@ -278,7 +279,8 @@ func (s *receiveSubscription) connectServerStream(ctx context.Context,
278279

279280
// Read incoming messages and send them to the channel where the caller
280281
// is listening to.
281-
log.InfoS(ctx, "Successfully connected to mailbox server")
282+
log.InfoS(ctx, "Successfully connected to mailbox server",
283+
"server_addr", s.cfg.ServerAddress)
282284
s.wg.Add(1)
283285
go func() {
284286
defer s.wg.Done()

0 commit comments

Comments
 (0)