File tree 1 file changed +22
-0
lines changed
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -602,6 +602,28 @@ void falco_configuration::load_yaml(const std::string& config_name)
602
602
m_config.get_sequence <std::vector<rule_selection_config>>(m_rules_selection, " rules" );
603
603
m_config.get_sequence <std::vector<append_output_config>>(m_append_output, " append_output" );
604
604
605
+ // check if append_output matching conditions are sane, if not emit a warning
606
+ for (auto const & entry : m_append_output)
607
+ {
608
+ if (entry.m_rule != " " && entry.m_tags .size () > 0 )
609
+ {
610
+ std::string tag_list;
611
+
612
+ for (auto const & tag : entry.m_tags )
613
+ {
614
+ tag_list += tag;
615
+ tag_list += " , " ;
616
+ }
617
+
618
+ tag_list.pop_back ();
619
+
620
+ falco_logger::log (falco_logger::level::WARNING,
621
+ " An append_ouptut entry specifies both a rule (" + entry.m_rule + " ) and a list of tags (" + tag_list + std::string (" ). " ) +
622
+ " This means that output will be appended only to the " + entry.m_rule + " rule and only if it has " +
623
+ " all the tags: " + tag_list + " ." );
624
+ }
625
+ }
626
+
605
627
std::vector<std::string> load_plugins;
606
628
607
629
bool load_plugins_node_defined = m_config.is_defined (" load_plugins" );
You can’t perform that action at this time.
0 commit comments