Class: LogStash::Codecs::Base
Constant Summary
LogStash::Config::Mixin::CONFIGSORT, LogStash::Config::Mixin::PLUGIN_VERSION_0_9_0, LogStash::Config::Mixin::PLUGIN_VERSION_1_0_0
Constants inherited
from Plugin
Plugin::NL
Instance Attribute Summary
#config, #original_params
Attributes inherited from Plugin
#logger, #params
Instance Method Summary
collapse
#config_init, included
Methods inherited from Plugin
#eql?, #finished, #finished?, #hash, #inspect, lookup, #reload, #running?, #shutdown, #terminating?, #to_s
Constructor Details
#initialize(params = {}) ⇒ Base
Returns a new instance of Base.
12
13
14
15
16
|
# File 'lib/logstash/codecs/base.rb', line 12
def initialize(params={})
super
config_init(params)
register if respond_to?(:register)
end
|
Instance Method Details
#clone ⇒ Object
47
48
49
|
# File 'lib/logstash/codecs/base.rb', line 47
def clone
return self.class.new(params)
end
|
#decode(data) ⇒ Object
Also known as:
<<
19
20
21
|
# File 'lib/logstash/codecs/base.rb', line 19
def decode(data)
raise "#{self.class}#decode must be overidden"
end
|
#encode(event) ⇒ Object
26
27
28
|
# File 'lib/logstash/codecs/base.rb', line 26
def encode(event)
raise "#{self.class}#encode must be overidden"
end
|
#flush(&block) ⇒ Object
40
41
42
43
44
|
# File 'lib/logstash/codecs/base.rb', line 40
def flush(&block)
end
|
#on_event(&block) ⇒ Object
35
36
37
|
# File 'lib/logstash/codecs/base.rb', line 35
def on_event(&block)
@on_event = block
end
|
#teardown ⇒ Object
31
|
# File 'lib/logstash/codecs/base.rb', line 31
def teardown; end
|