Skip to content

Commit

Permalink
fixing panic in error log
Browse files Browse the repository at this point in the history
Signed-off-by: Jaydip Gabani <[email protected]>
  • Loading branch information
JaydipGabani committed Jan 31, 2024
1 parent 88033b1 commit c57000e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/audit/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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
}

Expand Down

0 comments on commit c57000e

Please sign in to comment.