Class: LogStash::Outputs::Courier

Inherits:
Base
  • Object
show all
Defined in:
lib/logstash/outputs/courier.rb

Overview

Send events using the Log Courier protocol

Instance Method Summary collapse

Instance Method Details

#closeObject



72
73
74
75
# File 'lib/logstash/outputs/courier.rb', line 72

def close
  @client.shutdown
  nil
end

#receive(event) ⇒ Object



65
66
67
68
69
70
# File 'lib/logstash/outputs/courier.rb', line 65

def receive(event)
  return unless output?(event)

  @client.publish event.to_hash
  nil
end

#registerObject



57
58
59
60
61
62
63
# File 'lib/logstash/outputs/courier.rb', line 57

def register
  @logger.info 'Starting courier output'

  require 'log-courier/client'
  @client = LogCourier::Client.new(options)
  nil
end