From a7c18518a23b9473b36c1c3d46f47e0ae2c61a72 Mon Sep 17 00:00:00 2001 From: Lance Bragstad Date: Tue, 28 Nov 2023 16:50:40 -0600 Subject: [PATCH] Fix dpanic during remediation logging If a scan has debug enabled, the aggregator will log the remedation information. Previously, you'd see a `dpanic` in the logs because the keys passed into the logger were invalid. This commit updates the logging implementation to use the correct key pairs for the log. --- pkg/controller/compliancescan/forwarder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/compliancescan/forwarder.go b/pkg/controller/compliancescan/forwarder.go index 66d7f6552..65411261f 100644 --- a/pkg/controller/compliancescan/forwarder.go +++ b/pkg/controller/compliancescan/forwarder.go @@ -31,7 +31,7 @@ func (f logForwarder) SendComplianceCheckResult(c *compv1alpha1.ComplianceCheckR } func (f logForwarder) SendComplianceRemediation(r *compv1alpha1.ComplianceRemediation) error { - logf.Log.Info("ComplianceRemediation", r.Spec, r.Status) + logf.Log.Info("ComplianceRemediation", "ComplianceRemediation.Name", r.Name) return nil }