Skip to content

Commit c42cb60

Browse files
committed
small changes
1 parent 688bf14 commit c42cb60

File tree

4 files changed

+9
-133
lines changed

4 files changed

+9
-133
lines changed

fluent-plugin-jsonify.gemspec

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ $:.push File.expand_path('../lib', __FILE__)
55

66
Gem::Specification.new do |spec|
77
spec.name = "fluent-plugin-jsonify"
8-
spec.version = "0.0.1"
8+
spec.version = "0.1.1"
99
spec.authors = ["arun mj"]
10-
spec.email = ["arun.muraleedharan@flytxt.com"]
10+
spec.email = ["arunmj001@gmail.com"]
1111
spec.homepage = "https://github.com/arunmj/fluent-plugin-jsonify"
12-
spec.description = %q{Fluentd parser plugin to parse key-value pairs}
13-
spec.summary = %q{Fluentd parser plugin to parse key-value pairs}
12+
spec.description = %q{Fluent parser plugin to parse key-value pairs}
13+
spec.summary = %q{Fluent parser plugin to parse key-value pairs}
1414
spec.license = "MIT"
1515
spec.has_rdoc = false
1616

@@ -22,4 +22,6 @@ Gem::Specification.new do |spec|
2222
spec.add_dependency 'fluentd', "~> 0.10"
2323
spec.add_development_dependency "rake", ">0"
2424
spec.add_development_dependency "rspec", ">0"
25+
26+
spec.required_ruby_version = '~> 2.0'
2527
end

lib/fluent/plugin/parser_jsonify.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ class JsonKeyValueParser < Parser
4040

4141

4242
def configure(conf)
43-
super end
43+
super
44+
end
4445

4546
def parse(text)
4647

@@ -102,7 +103,6 @@ def parse(text)
102103
end
103104

104105
if @adjustment_rules
105-
$log.info "adjusting record ..."
106106
record = adjust_record(record)
107107
end
108108
yield nil,record
@@ -113,6 +113,7 @@ def parse(text)
113113
def adjust_record(record)
114114
record.keys.each_with_index do |k,i|
115115
if adjustment_rules.key? k
116+
$log.debug "adjusting record ... for key : #{k}"
116117
neighbour_key = record.keys[i+1]
117118
valstr = [record[k],neighbour_key].join(@pair_delimiter)
118119
puts "origina : " + valstr

t.rb

Lines changed: 0 additions & 14 deletions
This file was deleted.

test.rb

Lines changed: 0 additions & 113 deletions
This file was deleted.

0 commit comments

Comments
 (0)