From 6272db1714461ff7c2ef9f31046c45ad163b9c0e Mon Sep 17 00:00:00 2001 From: Nikolay Martyanov Date: Tue, 14 Jan 2025 15:37:16 +0100 Subject: [PATCH] pillar: Refine log messages for threshold-based timing warnings. Update log messages in `StillRunning` and `CheckMaxTimeTopic` functions to clarify the context of timing warnings and errors. Replace ambiguous phrases with more explicit references to exceeding warning and error thresholds. Issue: #4521 Signed-off-by: Nikolay Martyanov (cherry picked from commit d31ef123c52461142f6e08233b86df535563c41b) --- pkg/pillar/pubsub/checkmaxtime.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/pillar/pubsub/checkmaxtime.go b/pkg/pillar/pubsub/checkmaxtime.go index ba8d93ccf6..1821de1b74 100644 --- a/pkg/pillar/pubsub/checkmaxtime.go +++ b/pkg/pillar/pubsub/checkmaxtime.go @@ -32,10 +32,10 @@ func (p *PubSub) StillRunning(agentName string, warnTime time.Duration, errTime } elapsed := time.Since(ls) if elapsed > errTime { - log.Errorf("StillRunning(%s) XXX took a long time: %d", + log.Errorf("StillRunning(%s) took a long time (longer than the error threshold): %d", agentName, elapsed/time.Second) } else if elapsed > warnTime { - log.Warnf("StillRunning(%s) took a long time: %d", + log.Warnf("StillRunning(%s) took a long time (longer than the warning threshold): %d", agentName, elapsed/time.Second) } lockedLastStillMap.Store(agentName, time.Now()) @@ -71,10 +71,10 @@ func (p *PubSub) CheckMaxTimeTopic(agentName string, topic string, start time.Ti elapsed := time.Since(start) if elapsed > errTime && errTime != 0 { - p.log.Errorf("%s handler in %s XXX took a long time: %d", + p.log.Errorf("%s handler in %s took a long time (longer than the error threshold): %d", topic, agentName, elapsed/time.Second) } else if elapsed > warnTime && warnTime != 0 { - p.log.Warnf("%s handler in %s took a long time: %d", + p.log.Warnf("%s handler in %s took a long time (longer than the warning threshold): %d", topic, agentName, elapsed/time.Second) } }