fluent-plugin-maskrx 0.0.1.beta1 → 0.0.1.beta5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 45025880984ced2282ac66208cc5966fedc32496
4
- data.tar.gz: fd67a25b59aca551f1a55dd5eaec70f465dd330a
2
+ SHA256:
3
+ metadata.gz: 53c6cd92c58cb24980f19661bb163ad618be7b51de7719e62de8e58c6a3625db
4
+ data.tar.gz: 037b09d8fce4cada16feefc80574d4277367610902e4f6659bef98b642302fc4
5
5
  SHA512:
6
- metadata.gz: d861b468466096d4b78c1ea844f6732e578bef7bc5aff7c337bfda86af937850dc8976b6ab830e58ee26b801d218b02840fddbe9a6835749b478120240d8aec8
7
- data.tar.gz: fbef82c26eb680b4e25ea2614a0c2c478572b26863eeaf6fb99262c374d50d87c3a6f5c515eab3c5c464759c0ea3b472758f7b52812fbaa708a924386c62ec58
6
+ metadata.gz: bc625745020d967198afdd21aeeebdbf42e4f477f706144af28b86b1bb2bd1d21c65094b2edc420de81fce23e4ffb6a5a5b94f785c609250b51b7ebf7edcd5dd
7
+ data.tar.gz: a1052813ccc2b2b1bcfecfda30980f670b4cdf410ce3e320c3934a76cb657a17dea9fb051df25d00f872fa58821d57bddfcc14611c40c5843d7420c9ab6f262b
data/.gitignore CHANGED
@@ -1,2 +1,4 @@
1
1
  .bundle
2
2
  Gemfile.lock
3
+ pkg
4
+ .DS_Store
@@ -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.beta1"
7
+ spec.version = "0.0.1.beta5"
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.}
@@ -16,12 +16,21 @@ module Fluent::Plugin
16
16
 
17
17
  def configure(conf)
18
18
  super
19
- end
20
19
 
21
- def filter(_, _, record)
20
+ patterns = []
22
21
  @mask_config_list.each do |config|
23
22
  raise Fluent::ConfigError, "pattern is required" if config.pattern.nil?
24
23
 
24
+ patterns.push(config.pattern)
25
+ end
26
+
27
+ log.info("pluginx=maskrx at=configure patterns=\"#{patterns}\"")
28
+ end
29
+
30
+ def filter(_, _, record)
31
+ log.debug("plugin=maskrx at=filter record=\"#{record}\"")
32
+
33
+ @mask_config_list.each do |config|
25
34
  record = mask_record(config, record)
26
35
  end
27
36
 
@@ -31,6 +40,7 @@ module Fluent::Plugin
31
40
  protected
32
41
  def mask_record(config, record)
33
42
  keys = (config.keys.nil? ? record.keys : config.keys)
43
+ log.debug("plugin=maskrx at=mask_record keys=\"#{keys}\"")
34
44
 
35
45
  keys.each do |key|
36
46
  record[key] = mask_key_value(config.pattern, config.mask, record[key]) unless record[key].nil?
@@ -51,6 +61,8 @@ module Fluent::Plugin
51
61
  value.gsub!(m, mask)
52
62
  end
53
63
 
64
+ log.debug("plugin=maskrx at=mask_key_value pattern=#{pattern} value=\"#{value}\"")
65
+
54
66
  return value
55
67
  end
56
68
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-maskrx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.beta1
4
+ version: 0.0.1.beta5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Mervine
@@ -121,8 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  - !ruby/object:Gem::Version
122
122
  version: 1.3.1
123
123
  requirements: []
124
- rubyforge_project:
125
- rubygems_version: 2.5.2
124
+ rubygems_version: 3.1.4
126
125
  signing_key:
127
126
  specification_version: 4
128
127
  summary: Fluentd filter plugin to mask strings within records.