From bd0fe36c539a066f4065ac5fd987e6af8892f3da Mon Sep 17 00:00:00 2001 From: yusing Date: Thu, 5 Jun 2025 18:49:11 +0800 Subject: [PATCH] fix(idlewatcher): should not print idle_timeout fields on dependencies --- internal/idlewatcher/watcher.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/idlewatcher/watcher.go b/internal/idlewatcher/watcher.go index e1d9714..0c2e415 100644 --- a/internal/idlewatcher/watcher.go +++ b/internal/idlewatcher/watcher.go @@ -244,11 +244,14 @@ func NewWatcher(parent task.Parent, r routes.Route, cfg *idlewatcher.Config) (*W kind = "proxmox" } w.l = log.With(). - Stringer("idle_timeout", cfg.IdleTimeout). Str("kind", kind). Str("container", cfg.ContainerName()). Logger() + if cfg.IdleTimeout != neverTick { + w.l = w.l.With().Stringer("idle_timeout", cfg.IdleTimeout).Logger() + } + if err != nil { return nil, err }