Class: LogStash::Codecs::Base
Direct Known Subclasses
CompressSpooler, Dots, EDN, EDNLines, Fluent, Graphite, JSON, JSONLines, Line, Msgpack, Multiline, Netflow, Noop, OldLogStashJSON, Plain, RubyDebug, Spool
Constant Summary
LogStash::Config::Mixin::CONFIGSORT
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
46
47
48
|
# File 'lib/logstash/codecs/base.rb', line 46
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(data) ⇒ Object
26
27
28
|
# File 'lib/logstash/codecs/base.rb', line 26
def encode(data)
raise "#{self.class}#encode must be overidden"
end
|
#flush(&block) ⇒ Object
39
40
41
42
43
|
# File 'lib/logstash/codecs/base.rb', line 39
def flush(&block)
end
|
#on_event(&block) ⇒ Object
34
35
36
|
# File 'lib/logstash/codecs/base.rb', line 34
def on_event(&block)
@on_event = block
end
|
#teardown ⇒ Object
31
|
# File 'lib/logstash/codecs/base.rb', line 31
def teardown; end
|