class Fluent::Plugin::BareOutput
Attributes
emit_count[R]
emit_records[R]
num_errors[R]
Public Class Methods
new()
click to toggle source
Calls superclass method
Fluent::PluginLoggerMixin.new
# File lib/fluent/plugin/bare_output.rb, line 41 def initialize super @counters_monitor = Monitor.new # TODO: well organized counters @num_errors = 0 @emit_count = 0 @emit_records = 0 end
Public Instance Methods
emit_sync(tag, es)
click to toggle source
# File lib/fluent/plugin/bare_output.rb, line 50 def emit_sync(tag, es) @counters_monitor.synchronize{ @emit_count += 1 } begin process(tag, es) @counters_monitor.synchronize{ @emit_records += es.size } rescue @counters_monitor.synchronize{ @num_errors += 1 } raise end end
Also aliased as: emit_events
process(tag, es)
click to toggle source
# File lib/fluent/plugin/bare_output.rb, line 37 def process(tag, es) raise NotImplementedError, "BUG: output plugins MUST implement this method" end