Skip to content

Commit

Permalink
Add error location to emit error logs. fix #1737
Browse files Browse the repository at this point in the history
  • Loading branch information
repeatedly committed Nov 13, 2017
1 parent d36de72 commit 841f095
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fluent/root_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def find_label(label_name)
end

def emit_error_event(tag, time, record, error)
error_info = {error: error, tag: tag, time: time}
error_info = {error: error, location: (error.backtrace ? error.backtrace.first : nil), tag: tag, time: time}
if @error_collector
# A record is not included in the logs because <@ERROR> handles it. This warn is for the notification
log.warn "send an error event to @ERROR:", error_info
Expand Down

0 comments on commit 841f095

Please sign in to comment.