Skip to content

Commit

Permalink
Merge pull request #1746 from fluent/add-error-location-to-emit-error
Browse files Browse the repository at this point in the history
Add error location to emit error logs. fix #1737
  • Loading branch information
repeatedly authored Nov 14, 2017
2 parents 6205781 + 841f095 commit 5236a57
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 5236a57

Please sign in to comment.