Sha256: 18cf7aa98ae07f31b107cbc9046d86bc488b90c5b07b11503413f7a90cafd947

Contents?: true

Size: 660 Bytes

Versions: 9

Compression:

Stored size: 660 Bytes

Contents

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

class LogStash::Filters::Base
  attr_accessor :logger

  public
  def initialize(config = {})
    @logger = LogStash::Logger.new(STDERR)
    @config = config
  end # def initialize

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

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

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
logstash-lite-0.2.20110505142231 lib/logstash/filters/base.rb
logstash-lite-0.2.20110422152244 lib/logstash/filters/base.rb
logstash-lite-0.2.20110405105201 lib/logstash/filters/base.rb
logstash-lite-0.2.20110331121236 lib/logstash/filters/base.rb
logstash-lite-0.2.20110329105411 lib/logstash/filters/base.rb
logstash-lite-0.2.20110206003603 lib/logstash/filters/base.rb
logstash-lite-0.2.20110203130400 lib/logstash/filters/base.rb
logstash-lite-0.2.20110122143801 lib/logstash/filters/base.rb
logstash-lite-0.2.20110112115019 lib/logstash/filters/base.rb