Skip to content

Commit

Permalink
cleanup(engine): print total number of enabled rules
Browse files Browse the repository at this point in the history
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
  • Loading branch information
incertum authored and poiana committed May 16, 2024
1 parent 77341cb commit 6057c15
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions userspace/engine/evttype_index_ruleset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,16 +233,19 @@ void evttype_index_ruleset::on_loading_complete()
void evttype_index_ruleset::print_enabled_rules_falco_logger()
{
falco_logger::log(falco_logger::level::DEBUG, "Enabled rules:\n");
int n = 0;
for (const auto& ruleset_ptr : m_rulesets)
{
if (ruleset_ptr)
{
for (const auto& wrap : ruleset_ptr->get_filters())
{
n++;
falco_logger::log(falco_logger::level::DEBUG, std::string(" ") + wrap->rule.name + "\n");
}
}
}
falco_logger::log(falco_logger::level::DEBUG, "(" + std::to_string(n) + ") enabled rules in total\n");
}

void evttype_index_ruleset::clear()
Expand Down

0 comments on commit 6057c15

Please sign in to comment.