fluent-plugin-lazy-json-parser 0.0.2 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f1b11d1b9d3f8a9c03e0ebcbb50b29fab9be1a0b
4
- data.tar.gz: 4bd9db623dee2717d0537ec3ac8352ff121fd1c1
3
+ metadata.gz: 53652dd74a52044e1f792c68550a3b3d3d9ae3d7
4
+ data.tar.gz: 4d30401cde13eaf73a2d7580ca3f3ee4c9e4878e
5
5
  SHA512:
6
- metadata.gz: c7f620f7c414a01cecd1739f8fb5c6d289875f5089c5f58ce7ac93d67e2daf6b274e0058fe960beaa9565441f2bc5a8bc974ec6453f163cfde2634c887ba4723
7
- data.tar.gz: 7aed003e13c2037cf3f55d54fcabe1a069d2dbad6e11449f07f8cc4ae2652ff0b082931a5a9094e9c7f94b34ec28d7362dfa1ee11a9fb1ecaf9e3ee26bdd7f6e
6
+ metadata.gz: fb92079ce477ad1f9b062b93d62622dc3aa9023b690793226ea8e896ef92c6cc1d4ed84d2274018dcf512859b396dad108ad4dd88687fd1f89ad2aff011581b4
7
+ data.tar.gz: e7bda3df9fe27bc0cb74789b842e66bca79dac21b29992a6dd4f7caf0d1635bf04ef38a9b6c506f45aa2b71ff2587f75619534ca3ddfca992bdd9552347fa94d
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Gem::Specification.new do |gem|
3
3
  gem.name = "fluent-plugin-lazy-json-parser"
4
- gem.version = "0.0.2"
4
+ gem.version = "0.0.3"
5
5
  gem.authors = ["mathpl"]
6
6
  gem.email = ["math.pay@gmail.com"]
7
7
  gem.description = %q{fluentd plugin to json parse single field if possible or simply forward the data if impossible. Can also combine log structure into single field}
@@ -36,7 +36,13 @@ class Fluent::ParserOutput < Fluent::Output
36
36
  t,values = raw_value ? parse(raw_value) : [nil,nil]
37
37
  t ||= time
38
38
 
39
- r = @reserve_data ? record.merge(values) : values
39
+ if @reserve_data
40
+ record.delete(@key_name)
41
+ r = record.merge(values)
42
+ else
43
+ r = values
44
+ end
45
+
40
46
  if r
41
47
  Fluent::Engine.emit(tag,t,r)
42
48
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-lazy-json-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - mathpl