Class: LogStash::Inputs::Lumberjack
- Defined in:
- lib/logstash/inputs/lumberjack.rb
Overview
Receive events using the lumberjack protocol.
This is mainly to receive events shipped with lumberjack, <github.com/jordansissel/lumberjack>
Constant Summary
Constants included from Config::Mixin
Instance Attribute Summary
Attributes inherited from Base
Attributes included from Config::Mixin
Attributes inherited from Plugin
Instance Method Summary collapse
Methods inherited from Base
Methods included from Config::Mixin
Methods inherited from Plugin
#eql?, #finished, #finished?, #hash, #initialize, #inspect, lookup, #reload, #running?, #shutdown, #teardown, #terminating?, #to_s
Constructor Details
This class inherits a constructor from LogStash::Inputs::Base
Instance Method Details
#register ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/logstash/inputs/lumberjack.rb', line 34 def register require "lumberjack/server" @logger.info("Starting lumberjack input listener", :address => "#{@host}:#{@port}") @lumberjack = Lumberjack::Server.new(:address => @host, :port => @port, :ssl_certificate => @ssl_certificate, :ssl_key => @ssl_key, :ssl_key_passphrase => @ssl_key_passphrase) end |
#run(output_queue) ⇒ Object
44 45 46 47 48 49 50 51 52 |
# File 'lib/logstash/inputs/lumberjack.rb', line 44 def run(output_queue) @lumberjack.run do |l| @codec.decode(l.delete("line")) do |event| decorate(event) l.each { |k,v| event[k] = v; v.force_encoding("UTF-8") } output_queue << event end end end |