Sha256: 651a83194003e08b81d8ccd143439b52c6972d9caf3891474e38e98fd61182a0

Contents?: true

Size: 688 Bytes

Versions: 13

Compression:

Stored size: 688 Bytes

Contents

require "logstash/namespace"
require "logstash/event"
require "logstash/logging"
require "cgi"
require "uri"

class LogStash::Outputs::Base
  def initialize(url, config={}, &block)
    @url = url
    @url = URI.parse(url) if url.is_a? String
    @config = config
    @logger = LogStash::Logger.new(STDOUT)
    @urlopts = {}
    if @url.query
      @urlopts = CGI.parse(@url.query)
      @urlopts.each do |k, v|
        @urlopts[k] = v.last if v.is_a?(Array)
      end
    end
  end

  def register
    raise "#{self.class}#register must be overidden"
  end # def register

  def receive(event)
    raise "#{self.class}#receive must be overidden"
  end
end # class LogStash::Outputs::Base

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
logstash-lite-0.2.20101201111523 lib/logstash/outputs/base.rb
logstash-lite-0.2.20101129210156 lib/logstash/outputs/base.rb
logstash-lite-0.2.20101129205551 lib/logstash/outputs/base.rb
logstash-lite-0.2.20101129155412 lib/logstash/outputs/base.rb
logstash-lite-0.2.20101124030048 lib/logstash/outputs/base.rb
logstash-lite-0.2.20101124004656 lib/logstash/outputs/base.rb
logstash-lite-0.2.20101123134625 lib/logstash/outputs/base.rb
logstash-lite-0.2.20101123133737 lib/logstash/outputs/base.rb
logstash-lite-0.2.20101120024757 lib/logstash/outputs/base.rb
logstash-lite-0.2.20101120021802 lib/logstash/outputs/base.rb
logstash-lite-0.2.20101119183130 lib/logstash/outputs/base.rb
logstash-lite-0.2.20101118141920 lib/logstash/outputs/base.rb
logstash-lite-0.2.20101118134500 lib/logstash/outputs/base.rb