Class: LogStash::Filters::Base
- Inherits:
-
Object
- Object
- LogStash::Filters::Base
show all
- Defined in:
- lib/logstash/filters/base.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(config = {}) ⇒ Base
Returns a new instance of Base.
8
9
10
11
|
# File 'lib/logstash/filters/base.rb', line 8
def initialize(config = {})
@logger = LogStash::Logger.new(STDERR)
@config = config
end
|
Instance Attribute Details
#logger ⇒ Object
Returns the value of attribute logger.
5
6
7
|
# File 'lib/logstash/filters/base.rb', line 5
def logger
@logger
end
|
Instance Method Details
#add_config(type, typeconfig) ⇒ Object
24
25
26
27
28
29
30
|
# File 'lib/logstash/filters/base.rb', line 24
def add_config(type, typeconfig)
if @config.include?(type)
@config[type].merge!(typeconfig)
else
@config[type] = typeconfig
end
end
|
#filter(event) ⇒ Object
19
20
21
|
# File 'lib/logstash/filters/base.rb', line 19
def filter(event)
raise "#{self.class}#filter must be overidden"
end
|
#register ⇒ Object
14
15
16
|
# File 'lib/logstash/filters/base.rb', line 14
def register
raise "#{self.class}#register must be overidden"
end
|