Skip to content

Commit

Permalink
feat(main): added filtered by computer name to json format event log #…
Browse files Browse the repository at this point in the history
  • Loading branch information
hitenkoku committed Jul 9, 2023
1 parent 2358980 commit eb23dbf
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1274,6 +1274,22 @@ impl App {
// Computer名に対応する内容はHostnameであることがわかったためデータをクローンして投入
data["Event"]["System"]["Computer"] =
data["Event"]["EventData"]["Hostname"].clone();

// Computer名がinclude_computerで指定されたものに合致しないまたはexclude_computerで指定されたものに合致した場合はフィルタリングする。
if utils::is_filtered_by_computer_name(
utils::get_event_value(
"Event.System.Computer",
&data,
&stored_static.eventkey_alias,
),
(
&stored_static.include_computer,
&stored_static.exclude_computer,
),
) {
continue;

Check warning on line 1290 in src/main.rs

View check run for this annotation

Codecov / codecov/patch

src/main.rs#L1290

Added line #L1290 was not covered by tests
}

// channelがnullである場合とEventID Filter optionが指定されていない場合は、target_eventids.txtでイベントIDベースでフィルタする。
if !self._is_valid_channel(
&data,
Expand Down

0 comments on commit eb23dbf

Please sign in to comment.