Skip to content

Commit

Permalink
changed level output from informational to info #491
Browse files Browse the repository at this point in the history
  • Loading branch information
hitenkoku committed Apr 14, 2022
1 parent d4aec68 commit ac50a25
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/afterfact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ fn emit_csv<W: std::io::Write>(

for (time, detect_infos) in messages.iter() {
for detect_info in detect_infos {
let mut level = detect_info.level.to_string();
if level == "informational" {
level = "info".to_string();
}
if displayflag {
let colors = color_map
.as_ref()
Expand All @@ -160,7 +164,7 @@ fn emit_csv<W: std::io::Write>(

let dispformat = DisplayFormat {
timestamp: &_format_cell(&format_time(time), ColPos::First, colors),
level: &_format_cell(&detect_info.level, ColPos::Other, colors),
level: &_format_cell(&level, ColPos::Other, colors),
computer: &_format_cell(&detect_info.computername, ColPos::Other, colors),
event_i_d: &_format_cell(&detect_info.eventid, ColPos::Other, colors),
rule_title: &_format_cell(&detect_info.alert, ColPos::Other, colors),
Expand All @@ -172,7 +176,7 @@ fn emit_csv<W: std::io::Write>(
// csv出力時フォーマット
wtr.serialize(CsvFormat {
timestamp: &format_time(time),
level: &detect_info.level,
level: &level,
computer: &detect_info.computername,
event_i_d: &detect_info.eventid,
mitre_attack: &detect_info.tag_info,
Expand Down

0 comments on commit ac50a25

Please sign in to comment.