Class: LogStash::Outputs::Courier
- Inherits:
-
Base
- Object
- Base
- LogStash::Outputs::Courier
- Defined in:
- lib/logstash/outputs/courier.rb
Overview
Send events using the Log Courier protocol
Instance Method Summary collapse
-
#close ⇒ Object
Logstash >= 2.0.0 shutdown.
- #receive(event) ⇒ Object
- #register ⇒ Object
-
#teardown ⇒ Object
Logstash < 2.0.0 shutdown.
Instance Method Details
#close ⇒ Object
Logstash >= 2.0.0 shutdown
78 79 80 81 82 |
# File 'lib/logstash/outputs/courier.rb', line 78 def close @client.shutdown finished nil end |
#receive(event) ⇒ Object
67 68 69 70 |
# File 'lib/logstash/outputs/courier.rb', line 67 def receive(event) return unless output?(event) @client.publish event.to_hash end |
#register ⇒ Object
60 61 62 63 64 65 |
# File 'lib/logstash/outputs/courier.rb', line 60 def register @logger.info 'Starting courier output' require 'log-courier/client' @client = LogCourier::Client.new() end |
#teardown ⇒ Object
Logstash < 2.0.0 shutdown
73 74 75 |
# File 'lib/logstash/outputs/courier.rb', line 73 def teardown close end |