Skip to content

Commit

Permalink
🐛 Keep rule total in output logging (#435)
Browse files Browse the repository at this point in the history
Closes #434

Signed-off-by: Emily McMullan <[email protected]>
  • Loading branch information
eemcmullan authored Nov 20, 2023
1 parent c17657a commit 23e8c21
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ func (r *ruleEngine) RunRules(ctx context.Context, ruleSets []RuleSet, selectors
// Need a better name for this thing
ret := make(chan response)

var totalRules int32
var matchedRules int32
var unmatchedRules int32
var failedRules int32
Expand Down Expand Up @@ -195,8 +194,7 @@ func (r *ruleEngine) RunRules(ctx context.Context, ruleSets []RuleSet, selectors
rs.Unmatched = append(rs.Unmatched, response.Rule.RuleID)
}
}
atomic.AddInt32(&totalRules, 1)
r.logger.V(5).Info("rule response received", "total", totalRules, "failed", failedRules, "matched", matchedRules, "unmatched", unmatchedRules)
r.logger.V(5).Info("rule response received", "total", len(otherRules), "failed", failedRules, "matched", matchedRules, "unmatched", unmatchedRules)

}()
case <-ctx.Done():
Expand Down

0 comments on commit 23e8c21

Please sign in to comment.