class Fluent::BufferizeOutput
Attributes
output[R]
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_bufferize.rb, line 80 def initialize super end
Public Instance Methods
configure(conf)
click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_bufferize.rb, line 84 def configure(conf) super configs = conf.elements.select{|e| e.name == 'config'} if configs.size != 1 raise ConfigError, "Befferize: just one <config> directive is required" end type = configs.first['type'] unless type raise ConfigError, "Befferize: 'type' parameter is required in <config> directive" end @output = Plugin.new_output(type) @output.configure(configs.first) end
format(tag, time, record)
click to toggle source
# File lib/fluent/plugin/out_bufferize.rb, line 111 def format(tag, time, record) [tag, time, record].to_msgpack end
shutdown()
click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_bufferize.rb, line 106 def shutdown super @output.shutdown end
start()
click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_bufferize.rb, line 101 def start super @output.start end
write(chunk)
click to toggle source
# File lib/fluent/plugin/out_bufferize.rb, line 115 def write(chunk) PosKeeper.get(chunk).each { |tag, time, record | @output.emit(tag, OneEventStream.new(time, record), NullOutputChain.instance) } PosKeeper.remove(chunk) end