File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
1717 gem . require_paths = [ 'lib' ]
1818
1919 gem . add_runtime_dependency "fluentd"
20- gem . add_runtime_dependency "gelfd " , ">= 0.2 .0"
20+ gem . add_runtime_dependency "gelfd2 " , ">= 0.3 .0"
2121
2222 gem . add_development_dependency "bundler"
2323 gem . add_development_dependency "rake"
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class GelfInput < Fluent::Input
1313 def initialize
1414 super
1515 require 'fluent/plugin/socket_util'
16- require 'gelfd '
16+ require 'gelfd2 '
1717 end
1818
1919 desc "The value is the tag assigned to the generated events."
@@ -70,7 +70,7 @@ def run
7070
7171 def receive_data ( data , addr )
7272 begin
73- msg = Gelfd ::Parser . parse ( data )
73+ msg = Gelfd2 ::Parser . parse ( data )
7474 rescue => e
7575 log . warn 'Gelfd failed to parse a message' , error : e . to_s
7676 log . warn_backtrace
@@ -89,7 +89,7 @@ def receive_data(data, addr)
8989 time = record . delete ( 'timestamp' ) . to_i if record . key? ( 'timestamp' )
9090
9191 # Postprocess recorded event
92- strip_leading_underscore ( record ) if @strip_leading_underscore
92+ strip_leading_underscore_ ( record ) if @strip_leading_underscore
9393
9494 emit ( time , record )
9595 }
@@ -117,7 +117,7 @@ def emit(time, record)
117117
118118 private
119119
120- def strip_leading_underscore ( record )
120+ def strip_leading_underscore_ ( record )
121121 record . keys . each { |k |
122122 next unless k [ 0 , 1 ] == '_'
123123 record [ k [ 1 ..-1 ] ] = record . delete ( k )
You can’t perform that action at this time.
0 commit comments