lib/logstash/outputs/tcp.rb in logstash-lite-0.2.20101222161646 vs lib/logstash/outputs/tcp.rb in logstash-lite-0.2.20110112115019

- old
+ new

@@ -1,12 +1,10 @@ require "logstash/outputs/base" +require "logstash/namespace" class LogStash::Outputs::Tcp < LogStash::Outputs::Base - def initialize(url, config={}, &block) - super - end - + 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 @@ -14,9 +12,10 @@ 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