fluent-plugin-maskrx 0.0.1.beta2 → 0.0.1.beta3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/filter-plugin-maskrx.gemspec +1 -1
- data/lib/fluent/plugin/filter_maskrx.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6dc9dd484960f4efcb80a2a28c4a0873ecf43f96781803c0f83a680111e51a5
|
4
|
+
data.tar.gz: 5aa7a979394892af8a96b2070cf67c1c59879361616097c9c12ef3bba0ecb539
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a827c95272e29ac16ccb23424d96b0bbb1d8fd0f0c6ff8e2389f2b9f8e97aba15411ed3d8dcab2389b24a97ae30ac4d5160709f3d3f49b87449514fcd275b9d1
|
7
|
+
data.tar.gz: 70006931416eda376071bdc6add53043b9531e0fd197ead6946a644d4658567b9e26f1c5deaad7b4c173958614a95db0c36380d3355866aece2a526b6ac569f2
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "fluent-plugin-maskrx"
|
7
|
-
spec.version = "0.0.1.
|
7
|
+
spec.version = "0.0.1.beta3"
|
8
8
|
spec.authors = ["Joshua Mervine"]
|
9
9
|
spec.email = ["joshua@mervine.net"]
|
10
10
|
spec.summary = %q{Fluentd filter plugin to mask strings within records.}
|
@@ -23,7 +23,7 @@ module Fluent::Plugin
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def filter(_, _, record)
|
26
|
-
log.debug("
|
26
|
+
log.debug("plugin=maskrx at=filter record=\"#{record}\"")
|
27
27
|
|
28
28
|
@mask_config_list.each do |config|
|
29
29
|
record = mask_record(config, record)
|
@@ -35,6 +35,7 @@ module Fluent::Plugin
|
|
35
35
|
protected
|
36
36
|
def mask_record(config, record)
|
37
37
|
keys = (config.keys.nil? ? record.keys : config.keys)
|
38
|
+
log.debug("plugin=maskrx at=mask_record keys=\"#{keys}\"")
|
38
39
|
|
39
40
|
keys.each do |key|
|
40
41
|
record[key] = mask_key_value(config.pattern, config.mask, record[key]) unless record[key].nil?
|
@@ -55,7 +56,7 @@ module Fluent::Plugin
|
|
55
56
|
value.gsub!(m, mask)
|
56
57
|
end
|
57
58
|
|
58
|
-
log.debug("
|
59
|
+
log.debug("plugin=maskrx at=mask_key_value pattern=#{pattern} value=#{value}")
|
59
60
|
|
60
61
|
return value
|
61
62
|
end
|