diff --git a/internal/docker/id_lookup.go b/internal/docker/id_lookup.go index 125e3b5a..f0f4c78a 100644 --- a/internal/docker/id_lookup.go +++ b/internal/docker/id_lookup.go @@ -2,7 +2,6 @@ package docker import ( "github.com/puzpuzpuz/xsync/v4" - "github.com/rs/zerolog/log" ) var idDockerHostMap = xsync.NewMap[string, string](xsync.WithPresize(100)) @@ -12,7 +11,6 @@ func GetDockerHostByContainerID(id string) (string, bool) { } func SetDockerHostByContainerID(id, host string) { - log.Debug().Str("id", id).Str("host", host).Int("size", idDockerHostMap.Size()).Msg("setting docker host by container id") idDockerHostMap.Store(id, host) } diff --git a/internal/idlewatcher/health.go b/internal/idlewatcher/health.go index cf0b2844..73e67f2e 100644 --- a/internal/idlewatcher/health.go +++ b/internal/idlewatcher/health.go @@ -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 }