disp rule filepath (#179)

This commit is contained in:
James
2021-11-10 20:00:52 +09:00
committed by GitHub
parent b278f12cec
commit 9b24bc661b

View File

@@ -67,10 +67,8 @@ impl Detection {
err_msgs_result.err().iter().for_each(|err_msgs| { err_msgs_result.err().iter().for_each(|err_msgs| {
let stdout = std::io::stdout(); let stdout = std::io::stdout();
let mut stdout = stdout.lock(); let mut stdout = stdout.lock();
let errmsg_body = format!( let errmsg_body =
"Failed to parse Rule file. (Error Rule Title : {})", format!("Failed to parse Rule file. (FilePath : {})", rule.rulepath);
rule.yaml["title"].as_str().unwrap_or("")
);
AlertMessage::alert(&mut stdout, errmsg_body).ok(); AlertMessage::alert(&mut stdout, errmsg_body).ok();
err_msgs.iter().for_each(|err_msg| { err_msgs.iter().for_each(|err_msg| {