Sha256: 0ce7ee3af8013b81c8fc996c94bc4f6a778e0e8d1b95641ead75c952ddc7c041
Contents?: true
Size: 648 Bytes
Versions: 9
Compression:
Stored size: 648 Bytes
Contents
require "logstash/outputs/base" require "logstash/namespace" class LogStash::Outputs::Tcp < LogStash::Outputs::Base public def register # TODO(sissel): Write generic validation methods if !@url.host or !@url.port @logger.fatal("No host or port given in #{self.class}: #{@url}") # TODO(sissel): Make this an actual exception class raise "configuration error" end @connection = EventMachine::connect(@url.host, @url.port) end # def register public def receive(event) @connection.send_data(event.to_hash.to_json) @connection.send_data("\n") end # def receive end # class LogStash::Outputs::Tcp
Version data entries
9 entries across 9 versions & 1 rubygems