From 2ed2111c5291e9cad6d0ab583a6afc6cd647f875 Mon Sep 17 00:00:00 2001 From: leandrofars Date: Sun, 9 Jun 2024 19:16:59 -0300 Subject: [PATCH] chore(cwmp): status log filter --- backend/services/acs/internal/server/handler/status.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/services/acs/internal/server/handler/status.go b/backend/services/acs/internal/server/handler/status.go index 9cd3c91..4ab0cfd 100644 --- a/backend/services/acs/internal/server/handler/status.go +++ b/backend/services/acs/internal/server/handler/status.go @@ -11,7 +11,9 @@ func (h *Handler) HandleCpeStatus() { if cpe == "" { continue } - log.Println("Checking CPE " + cpe + " status") + if h.acsConfig.DebugMode { + log.Println("Checking CPE " + cpe + " status") + } if time.Since(h.Cpes[cpe].LastConnection) > h.acsConfig.KeepAliveInterval { log.Printf("LastConnection: %s, KeepAliveInterval: %s", h.Cpes[cpe].LastConnection, h.acsConfig.KeepAliveInterval) log.Println("CPE", cpe, "is offline") @@ -22,4 +24,4 @@ func (h *Handler) HandleCpeStatus() { } time.Sleep(10 * time.Second) } -} +} \ No newline at end of file