diff --git a/pkg/audit/manager.go b/pkg/audit/manager.go index d93e911a07d..163285cbeca 100644 --- a/pkg/audit/manager.go +++ b/pkg/audit/manager.go @@ -510,7 +510,7 @@ func (am *Manager) auditFromCache(ctx context.Context) ([]Result, []error) { excluded, err := am.skipExcludedNamespace(&obj) if err != nil { - am.log.Error(err, "Unable to exclude object namespace for audit from cache %v %s/%s", obj.GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()) + am.log.Error(err, fmt.Sprintf("Unable to exclude object namespace for audit from cache %v %s/%s", obj.GroupVersionKind().String(), obj.GetNamespace(), obj.GetName())) continue } @@ -525,7 +525,7 @@ func (am *Manager) auditFromCache(ctx context.Context) ([]Result, []error) { } resp, err := am.opa.Review(ctx, au, drivers.Stats(*logStatsAudit)) if err != nil { - am.log.Error(err, "Unable to review object from audit cache %v %s/%s", obj.GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()) + am.log.Error(err, fmt.Sprintf("Unable to review object from audit cache %v %s/%s", obj.GroupVersionKind().String(), obj.GetNamespace(), obj.GetName())) continue }