reverted removed event_value none check

This commit is contained in:
DastInDark
2022-08-10 01:06:39 +09:00
parent 67525f0b82
commit 7b4f2f3717

View File

@@ -348,6 +348,7 @@ impl LeafMatcher for DefaultMatcher {
// yamlにnullが設定されていた場合
if self.re.is_none() {
// レコード内に対象のフィールドが存在しなければ検知したものとして扱う
for v in self.key_list.iter() {
if recinfo.get_value(v).is_none() {
return true;
@@ -356,6 +357,10 @@ impl LeafMatcher for DefaultMatcher {
return false;
}
if event_value.is_none() {
return false;
}
let event_value_str = event_value.unwrap();
if self.key_list.is_empty() {
// この場合ただのgrep検索なので、ただ正規表現に一致するかどうか調べればよいだけ