Skip to content

Commit

Permalink
fix: fixing panic in error log (#3246)
Browse files Browse the repository at this point in the history
Signed-off-by: Jaydip Gabani <[email protected]>
(cherry picked from commit f70410b)
  • Loading branch information
JaydipGabani committed Jan 31, 2024
1 parent 7465cae commit f4f2503
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 f4f2503

Please sign in to comment.