From 00777878f2df0d183dc3b4c9ab57d8034810f806 Mon Sep 17 00:00:00 2001 From: Yael Genish <62285310+yaelgen@users.noreply.github.com> Date: Mon, 30 May 2022 22:50:04 +0300 Subject: [PATCH] log only when necessary (#23) --- .github/workflows/ci.yaml | 4 ++-- resourcescaler.go | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3c2ebbb..5b9c083 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,7 +11,7 @@ jobs: - uses: actions/setup-go@v2 with: - go-version: "^1.14.3" + go-version: "1.14" - uses: actions/cache@v2 with: @@ -31,7 +31,7 @@ jobs: - uses: actions/setup-go@v2 with: - go-version: "^1.14.3" + go-version: "1.14" - uses: actions/cache@v2 with: diff --git a/resourcescaler.go b/resourcescaler.go index d1256ee..2eb6754 100644 --- a/resourcescaler.go +++ b/resourcescaler.go @@ -122,7 +122,9 @@ func (s *AppResourceScaler) GetResources() ([]scaler_types.Resource, error) { } } - s.logger.DebugWith("Found services", "services", resources) + if len(resources) != 0 { + s.logger.DebugWith("Found services", "services", resources) + } return resources, nil }