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 }