class Fluent::RootAgent::RootAgentProxyWithoutErrorCollector
<label @ERROR> element use RootAgent
wrapped by # this RootAgentProxyWithoutErrorCollector
. So that those elements don't send cause infinite loop.
Public Class Methods
new(root_agent)
click to toggle source
Calls superclass method
# File lib/fluent/root_agent.rb, line 297 def initialize(root_agent) super @suppress_emit_error_log_interval = 0 @next_emit_error_log_time = nil interval_time = root_agent.instance_variable_get(:@suppress_emit_error_log_interval) suppress_interval(interval_time) unless interval_time.zero? end
Public Instance Methods
emit_error_event(tag, time, record, error)
click to toggle source
# File lib/fluent/root_agent.rb, line 307 def emit_error_event(tag, time, record, error) error_info = {error: error, tag: tag, time: time, record: record} log.warn "dump an error event in @ERROR:", error_info end
handle_emits_error(tag, es, e)
click to toggle source
# File lib/fluent/root_agent.rb, line 312 def handle_emits_error(tag, es, e) now = EventTime.now if @suppress_emit_error_log_interval.zero? || now > @next_emit_error_log_time log.warn "emit transaction failed in @ERROR:", error: e, tag: tag log.warn_backtrace @next_emit_error_log_time = now + @suppress_emit_error_log_interval end raise e end