aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2018-11-28 17:53:43 -0500
committerGitHub <noreply@github.com>2018-11-28 17:53:43 -0500
commit17abc668bb3b7a7b3febe10315654da8aa8102a1 (patch)
tree08c90724c41e6922f62c9d2fa30b60e55ccc9137 /actionpack
parent7d0c8ebe3550b52f750e249dd8ea312327d26d39 (diff)
parentacbc0e0467e7d4b7075c7b2df6404d807ba7d06c (diff)
downloadrails-17abc668bb3b7a7b3febe10315654da8aa8102a1.tar.gz
rails-17abc668bb3b7a7b3febe10315654da8aa8102a1.tar.bz2
rails-17abc668bb3b7a7b3febe10315654da8aa8102a1.zip
Merge pull request #34554 from sj26/group-exception-logs
Log exceptions atomically
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/middleware/debug_exceptions.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
index 5f5fdbc66a..7669767ae3 100644
--- a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
+++ b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
@@ -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