1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #34554 from sj26/group-exception-logs

Log exceptions atomically
This commit is contained in:
Rafael França 2018-11-28 17:53:43 -05:00 committed by GitHub
commit 17abc668bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -180,11 +180,14 @@ module ActionDispatch
trace = wrapper.framework_trace if trace.empty?
ActiveSupport::Deprecation.silence do
logger.fatal " "
logger.fatal "#{exception.class} (#{exception.message}):"
log_array logger, exception.annoted_source_code if exception.respond_to?(:annoted_source_code)
logger.fatal " "
log_array logger, trace
message = []
message << " "
message << "#{exception.class} (#{exception.message}):"
message.concat(exception.annoted_source_code) if exception.respond_to?(:annoted_source_code)
message << " "
message.concat(trace)
log_array(logger, message)
end
end