changed no outpu rule parse result with -s option #343
This commit is contained in:
@@ -5,6 +5,7 @@ use crate::detections::print::AlertMessage;
|
|||||||
use crate::detections::print::ERROR_LOG_STACK;
|
use crate::detections::print::ERROR_LOG_STACK;
|
||||||
use crate::detections::print::MESSAGES;
|
use crate::detections::print::MESSAGES;
|
||||||
use crate::detections::print::QUIET_ERRORS_FLAG;
|
use crate::detections::print::QUIET_ERRORS_FLAG;
|
||||||
|
use crate::detections::print::STATISTICS_FLAG;
|
||||||
use crate::detections::rule;
|
use crate::detections::rule;
|
||||||
use crate::detections::rule::AggResult;
|
use crate::detections::rule::AggResult;
|
||||||
use crate::detections::rule::RuleNode;
|
use crate::detections::rule::RuleNode;
|
||||||
@@ -273,6 +274,9 @@ impl Detection {
|
|||||||
parseerror_count: &u128,
|
parseerror_count: &u128,
|
||||||
ignore_count: &u128,
|
ignore_count: &u128,
|
||||||
) {
|
) {
|
||||||
|
if *STATISTICS_FLAG {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let mut total = parseerror_count + ignore_count;
|
let mut total = parseerror_count + ignore_count;
|
||||||
rc.into_iter().for_each(|(key, value)| {
|
rc.into_iter().for_each(|(key, value)| {
|
||||||
println!("{} rules: {}", key, value);
|
println!("{} rules: {}", key, value);
|
||||||
|
|||||||
@@ -228,11 +228,13 @@ impl AlertMessage {
|
|||||||
for error_log in ERROR_LOG_STACK.lock().unwrap().iter() {
|
for error_log in ERROR_LOG_STACK.lock().unwrap().iter() {
|
||||||
writeln!(error_log_writer, "{}", error_log).ok();
|
writeln!(error_log_writer, "{}", error_log).ok();
|
||||||
}
|
}
|
||||||
|
println!("");
|
||||||
println!(
|
println!(
|
||||||
"Errors were generated. Please check {} for details.",
|
"Errors were generated. Please check {} for details.",
|
||||||
ERROR_LOG_PATH.to_string()
|
ERROR_LOG_PATH.to_string()
|
||||||
);
|
);
|
||||||
println!("");
|
println!("");
|
||||||
|
println!("");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// ERRORメッセージを表示する関数
|
/// ERRORメッセージを表示する関数
|
||||||
|
|||||||
Reference in New Issue
Block a user