mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 01:38:50 +02:00
refactor: remove / throttle some debug logging
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user