fluent-plugin-maskrx 0.0.1.beta2 → 0.0.1.beta6

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
2
  SHA256:
3
- metadata.gz: 339d212ed1716a996b1ebdaaa7cd187f6bb92c790e6302aac418453cb9f256df
4
- data.tar.gz: c6c5fde1b1e06419bcd765aec62068e15324555da04bc33bc72f1e05f4bcfa46
3
+ metadata.gz: af4c4b45c83149a60dee9cd643853a49da490dfcc0576e66c84acb1d2dbbd7f1
4
+ data.tar.gz: 4b80b049f784281a55aed27f3d898e9a0332c1401ac9905429b6916b6c31fedf
5
5
  SHA512:
6
- metadata.gz: 4e978acf62e3c532e2fa6fd7c55a97e02e8a3ac0a501a05b9db6cfc8a7d3eb6c5a854328422e9051179440aa05c53258a12afddad8523fd78fe56396dc7a863a
7
- data.tar.gz: 9a2455fdf843a1a86c3c1ae437d74f74aa404a5f337ae45161b8965300b046b7f7481a75ee82c0f51d8169b20fee141a17e50a864fda1d96be6e67f9fb80f27f
6
+ metadata.gz: 19eea3dfc09e708ff36334392ad3a1ba3701b412d1bb3846e4f1661aa2fabe83f73f9803628226ca72db2cb6dc268a26fc352a3b31b42a4e65a9e178bdb48bbd
7
+ data.tar.gz: 353dd59ef66efd4f73579b619e545fd21fcf87950c642ce70630eee83562d938a81e2b055b6c36cc30b389d5ca720a521ec60e9c0de2ee83d6fa1532528753b7
@@ -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.beta2"
7
+ spec.version = "0.0.1.beta6"
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.}
@@ -17,13 +17,18 @@ module Fluent::Plugin
17
17
  def configure(conf)
18
18
  super
19
19
 
20
+ patterns = []
20
21
  @mask_config_list.each do |config|
21
22
  raise Fluent::ConfigError, "pattern is required" if config.pattern.nil?
23
+
24
+ patterns.push(config.pattern)
22
25
  end
26
+
27
+ log.info("plugin=maskrx at=configure patterns=\"#{patterns}\"")
23
28
  end
24
29
 
25
30
  def filter(_, _, record)
26
- log.debug("processing record: #{record}")
31
+ log.debug("plugin=maskrx at=filter record=\"#{record}\"")
27
32
 
28
33
  @mask_config_list.each do |config|
29
34
  record = mask_record(config, record)
@@ -35,6 +40,7 @@ module Fluent::Plugin
35
40
  protected
36
41
  def mask_record(config, record)
37
42
  keys = (config.keys.nil? ? record.keys : config.keys)
43
+ log.debug("plugin=maskrx at=mask_record keys=\"#{keys}\"")
38
44
 
39
45
  keys.each do |key|
40
46
  record[key] = mask_key_value(config.pattern, config.mask, record[key]) unless record[key].nil?
@@ -55,7 +61,7 @@ module Fluent::Plugin
55
61
  value.gsub!(m, mask)
56
62
  end
57
63
 
58
- log.debug("applied pattern=#{pattern} to value=#{value}")
64
+ log.debug("plugin=maskrx at=mask_key_value pattern=#{pattern} value=\"#{value}\"")
59
65
 
60
66
  return value
61
67
  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.beta2
4
+ version: 0.0.1.beta6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Mervine