aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorVipul A M <vipulnsward@gmail.com>2016-08-19 19:38:26 +0530
committerVipul A M <vipulnsward@gmail.com>2016-11-12 15:47:39 -0500
commit89fab56597c335bb49887563b9a98386b5171574 (patch)
tree36d593befb78ec7938780687bdc81014f880546e /actionpack/lib
parent26dd9b26ab7317f94fd285245879e888344143b2 (diff)
downloadrails-89fab56597c335bb49887563b9a98386b5171574.tar.gz
rails-89fab56597c335bb49887563b9a98386b5171574.tar.bz2
rails-89fab56597c335bb49887563b9a98386b5171574.zip
Format and send logs to logger.fatal from DebugExceptions instead of calling fatal multiple times. Expose tags_text from TaggedLogging to be used for log formatting
Fixes #26134
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/middleware/debug_exceptions.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
index 1a9018fe0c..1c720c5a8e 100644
--- a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
+++ b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
@@ -175,7 +175,11 @@ module ActionDispatch
end
def log_array(logger, array)
- array.map { |line| logger.fatal line }
+ if logger.formatter && logger.formatter.respond_to?(:tags_text)
+ logger.fatal array.join("\n#{logger.formatter.tags_text}")
+ else
+ logger.fatal array.join("\n")
+ end
end
def logger(request)