refactor: remove / throttle some debug logging

This commit is contained in:
yusing
2025-09-26 21:00:35 +08:00
parent 14e243d245
commit 55c1c918ba
2 changed files with 8 additions and 6 deletions

View File

@@ -151,10 +151,14 @@ func (w *Watcher) checkUpdateState() (ready bool, err error) {
healthTries: newHealthTries,
})
w.l.Debug().
Int("health_tries", newHealthTries).
Dur("elapsed", time.Since(state.startedAt)).
Msg("health check failed, still starting")
// log every 3 seconds
const everyN = int(3 * time.Second / idleWakerCheckInterval)
if newHealthTries%everyN == 0 {
w.l.Debug().
Int("health_tries", newHealthTries).
Dur("elapsed", time.Since(state.startedAt)).
Msg("health check failed, still starting")
}
return false, nil
}