Skip to content

Commit

Permalink
Add more location to error info. ref #1746
Browse files Browse the repository at this point in the history
  • Loading branch information
repeatedly committed Nov 14, 2017
1 parent f1e6b75 commit c7aba1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/fluent/root_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def emit_error_event(tag, time, record, error)
end

def handle_emits_error(tag, es, error)
error_info = {error: error, tag: tag}
error_info = {error: error, location: (error.backtrace ? error.backtrace.first : nil), tag: tag}
if @error_collector
log.warn "send an error event stream to @ERROR:", error_info
@error_collector.emit_stream(tag, es)
Expand Down Expand Up @@ -333,7 +333,7 @@ def initialize(root_agent)
end

def emit_error_event(tag, time, record, error)
error_info = {error: error, tag: tag, time: time, record: record}
error_info = {error: error, location: (error.backtrace ? error.backtrace.first : nil), tag: tag, time: time, record: record}
log.warn "dump an error event in @ERROR:", error_info
end

Expand Down

0 comments on commit c7aba1b

Please sign in to comment.