Skip to content

Commit

Permalink
fix(ebpf): use debug error level instead of error
Browse files Browse the repository at this point in the history
  • Loading branch information
geyslan committed Apr 17, 2024
1 parent 2fb9fe2 commit f8fb473
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pkg/ebpf/tracee.go
Original file line number Diff line number Diff line change
Expand Up @@ -1592,15 +1592,14 @@ func (t *Tracee) triggerMemDump(event trace.Event) []error {
// We want to use the policies of relevant to the triggering event
policies, err := policy.Snapshots().Get(event.PoliciesVersion)
if err != nil {
logger.Errorw("Error getting policies for print_mem_dump event", "error", err)
// For fallback, try to use latest polcies
logger.Debugw("Error getting policies for print_mem_dump event", "error", err)
// For fallback, try to use latest policies
policies, err = policy.Snapshots().GetLast()
if err != nil {
logger.Errorw("Error getting last snapshots policies for print_mem_dump event", "error", err)
// Last resort is to use the policies from the config
policies = t.config.Policies
return []error{err}
}
}

for it := policies.CreateAllIterator(); it.HasNext(); {
p := it.Next()
// This might break in the future if PrintMemDump will become a dependency of another event.
Expand Down

0 comments on commit f8fb473

Please sign in to comment.