From 5888e85493561ccdfd37dab982f358a552f7ae36 Mon Sep 17 00:00:00 2001 From: Dennis Haney Date: Wed, 30 Oct 2024 18:37:42 +0700 Subject: [PATCH] Update plan/plan.go Co-authored-by: Raffaele Di Fazio --- plan/plan.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plan/plan.go b/plan/plan.go index c63ff7c15..4488c9e2f 100644 --- a/plan/plan.go +++ b/plan/plan.go @@ -241,9 +241,11 @@ func (p *Plan) Calculate() *Plan { if ownersMatch { changes.Create = append(changes.Create, creates...) } else { - for _, current := range row.current { - log.Debugf(`Skipping endpoint %v because owner id does not match for one or more items to create, found: "%s", required: "%s"`, current, current.Labels[endpoint.OwnerLabelKey], p.OwnerID) - } +if log.GetLevel() == log.DebugLevel { + for _, current := range row.current { + log.Debugf(`Skipping endpoint %v because owner id does not match for one or more items to create, found: "%s", required: "%s"`, current, current.Labels[endpoint.OwnerLabelKey], p.OwnerID) + } +} } } }