fluent-plugin-text_to_json 0.1.9 → 0.1.10

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: f8e81af3fcc1c19328ec014fe2485a9e70004235
4
- data.tar.gz: cacd5b8654c547e1223c9a2edc36504b72d254ff
3
+ metadata.gz: 0c644c81bf90e033900c295af18ed1dedeb61c20
4
+ data.tar.gz: 1dd7c1776b5b67fede01b5c631de39a6135bda8a
5
5
  SHA512:
6
- metadata.gz: a25ae9d65a347eadb2f264957f04ea331ada772e70c0e2d2511559c891b225b795b8b15af19d9977f4a902ec6e18d968fd92f3cacfe2509f10fff225c119e8d6
7
- data.tar.gz: 0e7511ae18eb117ed82c49cea6f406116646af87cd41fe067835295602ef0aab76f02aa8038a1da01f8a7ace7b878d6a5a6d72e98180322b01d1733288abe3be
6
+ metadata.gz: 7cc15fa02ba62e03ee3bbbebb0dccad8a1b7c5a16a4f0152e4af2b28a783d5d169289fb11e35ecab3e0dd7518ed689f1e3fc2f8d890e9464f8b69539ae8c68cd
7
+ data.tar.gz: 45511c165b3f23126829a9b2cc8dfc3f0d5b6bafa1ab93849650b937ae615bb00580ae8a2e2f2ade04874a6b204d4f37dbb2e996738df863d344a0631e28f4aa
@@ -1,13 +1,9 @@
1
- require "fluent/formatter"
2
-
3
1
  module Fluent
4
- class TextToJsonFormatter < Formatter
5
- Plugin.register_formatter('text_to_json', self)
6
-
7
-
8
- include Configurable
2
+ module TextFormatter
3
+ class TextToJsonFormatter < Formatter
4
+ Fluent::Plugin.register_formatter('text_to_json', self)
9
5
 
10
- config_param :json_field, :string
6
+ config_param :json_field, :string, :default => "sdr,factor,1,2,3,4,5,6,7,8,9,10,11,12,13"
11
7
  config_param :field_splitter, :string
12
8
 
13
9
  def configure(conf)
@@ -15,7 +11,7 @@ module Fluent
15
11
  @fields = @json_field.split(",").map{|field| "\"" + field + "\""}
16
12
  end
17
13
 
18
- def format(record)
14
+ def format(tag, time, record)
19
15
  tmp_field = Array.new
20
16
  tmp_field = record.split(@field_splitter)
21
17
 
@@ -55,4 +51,5 @@ module Fluent
55
51
 
56
52
  end
57
53
  end
54
+ end
58
55
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-text_to_json
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - minwoo lee