Skip to content

Commit 67a67b6

Browse files
committed
fix: handle logger.Log error return values in scraper
1 parent f32a295 commit 67a67b6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/scraper/scraper.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ func runProber(
665665
) bool {
666666
start := time.Now()
667667

668-
logger.Log("level", "info", "msg", "Beginning check", "type", prober.Name(), "timeout_seconds", timeout.Seconds())
668+
_ = logger.Log("level", "info", "msg", "Beginning check", "type", prober.Name(), "timeout_seconds", timeout.Seconds())
669669

670670
checkCtx, cancel := context.WithTimeout(ctx, timeout)
671671
defer cancel()
@@ -700,10 +700,10 @@ func runProber(
700700

701701
if success {
702702
probeSuccessGauge.Set(1)
703-
logger.Log("level", "info", "msg", "Check succeeded", "duration_seconds", probeDuration)
703+
_ = logger.Log("level", "info", "msg", "Check succeeded", "duration_seconds", probeDuration)
704704
} else {
705705
probeSuccessGauge.Set(0)
706-
logger.Log("level", "error", "msg", "Check failed", "duration_seconds", probeDuration)
706+
_ = logger.Log("level", "error", "msg", "Check failed", "duration_seconds", probeDuration)
707707
}
708708

709709
smCheckInfo.Set(1)

0 commit comments

Comments
 (0)