logstash-filter-remove_key_pattern 0.1.2 → 0.1.3

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
  SHA1:
3
- metadata.gz: c2c12409aa5e0f41609dfdfb4ca4047186436e5f
4
- data.tar.gz: 937906045112c39cfdb47cef7ffd27c4613d8c02
3
+ metadata.gz: 7d837bda20e4d81b49d49548f2a5a024611fd614
4
+ data.tar.gz: 87d6392274e403878814b8f8717d01f091ba7f16
5
5
  SHA512:
6
- metadata.gz: 7b3d13054fbc69b2048aabc90dfa7a17e8fb3c453755229f8a3a20113093d065397e5eb7aa0add084101cd50bf9c46d788e23d48be6f067d5abd70dd178e5f40
7
- data.tar.gz: 3ec4e6f683eeb2cd18d729ada7f09cf8f5b34cb2997263aba272b4554bd79d21453a4959fc4bd1ba3abc91ea861c70d7c5d8b349e5efe6d391499b834b9dc790
6
+ metadata.gz: 2f51edc00e299f442ea9d61904abcab48bbdf98238a9688272e98af213bc2d8e99d5c8a0c75d7c046673fedd3a67da780e973da2a282c9d087418cb720c3b90d
7
+ data.tar.gz: 66e45c6a24f40d13eb8d39142abf87da840fd1a71f51a660d7cd5d98ecc9940982e312892c5c637f8eb86826a6ff49f6f2b76fec0421e6b44dae3e819ec143f5
@@ -42,7 +42,6 @@ class LogStash::Filters::RemoveKeyPattern < LogStash::Filters::Base
42
42
 
43
43
  public
44
44
  def filter(event)
45
- File.open('/tmp/logstash_events.txt', 'w+') { |file| file << event }
46
45
  @parent_keys.each do |key|
47
46
  remove_pattern(event, key) unless event.get(key).nil?
48
47
  end
@@ -61,6 +60,10 @@ class LogStash::Filters::RemoveKeyPattern < LogStash::Filters::Base
61
60
  end
62
61
  end
63
62
  end
64
- event.set(key, hash)
63
+ begin
64
+ event.set(key, hash)
65
+ rescue LogStash::Json::GeneratorError
66
+ return
67
+ end
65
68
  end
66
69
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-filter-remove_key_pattern'
3
- s.version = '0.1.2'
3
+ s.version = '0.1.3'
4
4
  s.licenses = ['Apache-2.0']
5
5
  s.summary = 'Remove all keys that match pattern'
6
6
  s.authors = ['Arthur Alfredo']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-remove_key_pattern
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arthur Alfredo