From 17321cdfc3f2ec43c1a9a44d323dd6b22efec299 Mon Sep 17 00:00:00 2001 From: Julian Brost Date: Thu, 23 Sep 2021 09:27:26 +0200 Subject: [PATCH] Fix use of wrong log function on heartbeat loss Has to use the Warnw function as it passes additional zap attributes. --- pkg/icingaredis/heartbeat.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/icingaredis/heartbeat.go b/pkg/icingaredis/heartbeat.go index 9559e6c6..198d1138 100644 --- a/pkg/icingaredis/heartbeat.go +++ b/pkg/icingaredis/heartbeat.go @@ -146,7 +146,7 @@ func (h *Heartbeat) controller(ctx context.Context) { h.beat.Broadcast() case <-time.After(timeout): if h.active { - h.logger.Warn("Lost Icinga 2 heartbeat", zap.Duration("timeout", timeout)) + h.logger.Warnw("Lost Icinga 2 heartbeat", zap.Duration("timeout", timeout)) h.lost.Broadcast() h.active = false } else {