fluent-plugin-multi-condition-selector 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d32fdd93c1276440f5cbc40c9165ad9873d9c089aee5dc417344d49db83b7b4e
|
4
|
+
data.tar.gz: 165b43376cc2e9d72307b821264a8f9dcf59a933b48f639364dd3adb0e04b682
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e612abcca3a0b7ba3a90d0e28a9f4d12a4da38c5a66f44c5962b2888162bd1b8dea56bea1627bb913e784d6b6d69ec2782a33444301f95cddd1f3c94f685f1aa
|
7
|
+
data.tar.gz: 320243ab706705ee9c7a455be13f6c8d10f276abad22a8567aa60ea7bcb0151e05496d4d0d6f50cb2190c1b9ae4ffb3a3452747c14d6db081059c4da2cb9abfd
|
@@ -40,6 +40,7 @@ module Fluent
|
|
40
40
|
config_param :auto_typecast, :bool, :default => true, # false for lower version compatibility
|
41
41
|
:desc => 'Automatically cast the field types.'
|
42
42
|
config_param :tag, :string, :default => 'checked_tag', :desc => "new record tag."
|
43
|
+
config_param :at_least_one, :bool, default: true, desc: "If true it should match conditions at least 1."
|
43
44
|
|
44
45
|
config_param(
|
45
46
|
"condition".to_sym,
|
@@ -131,7 +132,7 @@ module Fluent
|
|
131
132
|
# TODO: ここの処理よくないって evaluate
|
132
133
|
matched_conditions, aditional_data = evaluate_condition(@conditions, placeholder_values )
|
133
134
|
|
134
|
-
if matched_conditions.size > 0
|
135
|
+
if (@at_least_one && matched_conditions.size > 0) || @at_least_one == false
|
135
136
|
new_record = reform(record, aditional_data, placeholder_values)
|
136
137
|
if @renew_time_key && new_record.has_key?(@renew_time_key)
|
137
138
|
time = new_record[@renew_time_key].to_i
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-multi-condition-selector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- wally
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
11
|
+
date: 2020-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|