Class: LogStash::Outputs::Lumberjack
- Defined in:
- lib/logstash/outputs/lumberjack.rb
Constant Summary
Constants included from Config::Mixin
Instance Attribute Summary
Attributes included from Config::Mixin
Attributes inherited from Plugin
Instance Method Summary collapse
Methods inherited from Base
#handle, #handle_worker, #initialize, #worker_setup, #workers_not_supported
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::Outputs::Base
Instance Method Details
#receive(event) ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/logstash/outputs/lumberjack.rb', line 26 def receive(event) return unless output?(event) begin @client.write(event.to_hash) rescue Exception => e @logger.error("Client write error", :e => e, :backtrace => e.backtrace) connect retry end end |
#register ⇒ Object
20 21 22 23 |
# File 'lib/logstash/outputs/lumberjack.rb', line 20 def register require 'lumberjack/client' connect end |