From 9b24bc661b36cc3a7b707b203d22acf27d6a12bd Mon Sep 17 00:00:00 2001 From: James <32596618+ichiichi11@users.noreply.github.com> Date: Wed, 10 Nov 2021 20:00:52 +0900 Subject: [PATCH] disp rule filepath (#179) --- src/detections/detection.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/detections/detection.rs b/src/detections/detection.rs index d9eb2717..b8737821 100644 --- a/src/detections/detection.rs +++ b/src/detections/detection.rs @@ -67,10 +67,8 @@ impl Detection { err_msgs_result.err().iter().for_each(|err_msgs| { let stdout = std::io::stdout(); let mut stdout = stdout.lock(); - let errmsg_body = format!( - "Failed to parse Rule file. (Error Rule Title : {})", - rule.yaml["title"].as_str().unwrap_or("") - ); + let errmsg_body = + format!("Failed to parse Rule file. (FilePath : {})", rule.rulepath); AlertMessage::alert(&mut stdout, errmsg_body).ok(); err_msgs.iter().for_each(|err_msg| {