From 8ec55fe8dbfb2c2fba8f318d7bf3a16af17298d0 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Fri, 10 Nov 2023 09:40:54 +0200 Subject: [PATCH] apis/nfd: fix logging of rule expression processing --- pkg/apis/nfd/v1alpha1/expression.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/apis/nfd/v1alpha1/expression.go b/pkg/apis/nfd/v1alpha1/expression.go index febf5faa5..77753e9ff 100644 --- a/pkg/apis/nfd/v1alpha1/expression.go +++ b/pkg/apis/nfd/v1alpha1/expression.go @@ -211,14 +211,14 @@ func (m *MatchExpression) MatchKeys(name string, keys map[string]Nil) (bool, err } if klogV := klog.V(3); klogV.Enabled() { - klogV.InfoS("matched keys", "matchResult", "matched", "matchKey", name, "matchOp", m.Op) + klogV.InfoS("matched keys", "matchResult", matched, "matchKey", name, "matchOp", m.Op) } else if klogV := klog.V(4); klogV.Enabled() { k := make([]string, 0, len(keys)) for n := range keys { k = append(k, n) } sort.Strings(k) - klogV.InfoS("matched keys", "matchResult", "matched", "matchKey", name, "matchOp", m.Op, "inputKeys", k) + klogV.InfoS("matched keys", "matchResult", matched, "matchKey", name, "matchOp", m.Op, "inputKeys", k) } return matched, nil } @@ -232,9 +232,9 @@ func (m *MatchExpression) MatchValues(name string, values map[string]string) (bo } if klogV := klog.V(3); klogV.Enabled() { - klogV.InfoS("matched values", "matchResult", "matched", "matchKey", name, "matchOp", m.Op, "matchValue", m.Value) + klogV.InfoS("matched values", "matchResult", matched, "matchKey", name, "matchOp", m.Op, "matchValue", m.Value) } else if klogV := klog.V(4); klogV.Enabled() { - klogV.InfoS("matched values", "matchResult", "matched", "matchKey", name, "matchOp", m.Op, "matchValue", m.Value, "inputValues", values) + klogV.InfoS("matched values", "matchResult", matched, "matchKey", name, "matchOp", m.Op, "matchValue", m.Value, "inputValues", values) } return matched, nil