Skip to content

Commit f70410b

Browse files
authored
fix: fixing panic in error log (open-policy-agent#3246)
Signed-off-by: Jaydip Gabani <[email protected]>
1 parent 88033b1 commit f70410b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/audit/manager.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ func (am *Manager) auditFromCache(ctx context.Context) ([]Result, []error) {
510510

511511
excluded, err := am.skipExcludedNamespace(&obj)
512512
if err != nil {
513-
am.log.Error(err, "Unable to exclude object namespace for audit from cache %v %s/%s", obj.GroupVersionKind().String(), obj.GetNamespace(), obj.GetName())
513+
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()))
514514
continue
515515
}
516516

@@ -525,7 +525,7 @@ func (am *Manager) auditFromCache(ctx context.Context) ([]Result, []error) {
525525
}
526526
resp, err := am.opa.Review(ctx, au, drivers.Stats(*logStatsAudit))
527527
if err != nil {
528-
am.log.Error(err, "Unable to review object from audit cache %v %s/%s", obj.GroupVersionKind().String(), obj.GetNamespace(), obj.GetName())
528+
am.log.Error(err, fmt.Sprintf("Unable to review object from audit cache %v %s/%s", obj.GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()))
529529
continue
530530
}
531531

0 commit comments

Comments
 (0)