diff --git a/src/detections/detection.rs b/src/detections/detection.rs index 70225051..6aaa6179 100644 --- a/src/detections/detection.rs +++ b/src/detections/detection.rs @@ -5,6 +5,7 @@ use crate::detections::print::AlertMessage; use crate::detections::print::ERROR_LOG_STACK; use crate::detections::print::MESSAGES; use crate::detections::print::QUIET_ERRORS_FLAG; +use crate::detections::print::STATISTICS_FLAG; use crate::detections::rule; use crate::detections::rule::AggResult; use crate::detections::rule::RuleNode; @@ -273,6 +274,9 @@ impl Detection { parseerror_count: &u128, ignore_count: &u128, ) { + if *STATISTICS_FLAG { + return; + } let mut total = parseerror_count + ignore_count; rc.into_iter().for_each(|(key, value)| { println!("{} rules: {}", key, value); diff --git a/src/detections/print.rs b/src/detections/print.rs index 6c9ef6b8..3b20520b 100644 --- a/src/detections/print.rs +++ b/src/detections/print.rs @@ -228,11 +228,13 @@ impl AlertMessage { for error_log in ERROR_LOG_STACK.lock().unwrap().iter() { writeln!(error_log_writer, "{}", error_log).ok(); } + println!(""); println!( "Errors were generated. Please check {} for details.", ERROR_LOG_PATH.to_string() ); println!(""); + println!(""); } /// ERRORメッセージを表示する関数