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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d837bda20e4d81b49d49548f2a5a024611fd614
|
4
|
+
data.tar.gz: 87d6392274e403878814b8f8717d01f091ba7f16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
63
|
+
begin
|
64
|
+
event.set(key, hash)
|
65
|
+
rescue LogStash::Json::GeneratorError
|
66
|
+
return
|
67
|
+
end
|
65
68
|
end
|
66
69
|
end
|