Sha256: 8cefeaa4b6501c86d1754aa5e6c38f61775adf44441b79933c4f9a8c78d359cb

Contents?: true

Size: 606 Bytes

Versions: 3

Compression:

Stored size: 606 Bytes

Contents

require "logstash/namespace"
require "logstash/logging"

class LogStash::Filters::Base
  attr_accessor :logger
  def initialize(config = {})
    @logger = LogStash::Logger.new(STDERR)
    @config = config
  end # def initialize

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

  def filter(event)
    raise "#{self.class}#filter must be overidden"
  end # def filter

  def add_config(type, typeconfig)
    if @config.include?(type)
      @config[type].merge!(typeconfig)
    else
      @config[type] = typeconfig
    end
  end
end # class LogStash::Filters::Base

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
logstash-lite-0.2.20101222161646 lib/logstash/filters/base.rb
logstash-lite-0.2.20101208111718 lib/logstash/filters/base.rb
logstash-lite-0.2.20101207114354 lib/logstash/filters/base.rb