logstash-filter-units 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/logstash/filters/units.rb +6 -1
- data/logstash-filter-units.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 715700a1df38c5269a6682da3f3147e28fc9af4e
|
4
|
+
data.tar.gz: f3939494336911b8e21331d1e5d9c3fcd3d08b36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a5a07de25d9da2e44ee7c742f5c595276e4f5edb15b52b5dcee1eddb364aad60a5f5e8252b40705c53072d2f8374817bca188dc2c4ec3e2a0658d9e5f7167db
|
7
|
+
data.tar.gz: 4f13efeb7e0c5729da52830279770edf6ef39a79571b43c85f79f5a489af23df9e7aaa8cbee4fc9657d55c6b0873bd04e145a0dab9b72436052b8bd82c0510c6
|
@@ -264,6 +264,10 @@ class LogStash::Filters::Units < LogStash::Filters::Base
|
|
264
264
|
|
265
265
|
new_hash = matrix_to_nested_hash(matrix)
|
266
266
|
if @root_field
|
267
|
+
# merge old root field data instead of clobbering it
|
268
|
+
if event.include?(@root_field)
|
269
|
+
new_hash = event[@root_field].to_hash.merge(new_hash)
|
270
|
+
end
|
267
271
|
new_hash = {@root_field => new_hash}
|
268
272
|
end
|
269
273
|
|
@@ -275,7 +279,8 @@ class LogStash::Filters::Units < LogStash::Filters::Base
|
|
275
279
|
event[key] = value
|
276
280
|
end
|
277
281
|
return filter_matched(event)
|
278
|
-
rescue StandardError
|
282
|
+
rescue StandardError => e
|
283
|
+
@logger.warn("UnitsPluginError:", :exception => e.message)
|
279
284
|
event.tag("_unitsparsefailure")
|
280
285
|
return event
|
281
286
|
rescue Logstash::ShutdownSignal
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-filter-units'
|
4
|
-
s.version = '0.1.
|
4
|
+
s.version = '0.1.2'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "A filter for performing unit conversions on specified fields."
|
7
7
|
s.description = "The units filter is used for converting specified fields from one unit of measure to another (or many others)."
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-filter-units
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Braun
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash
|