diff options
author | Vipul A M <vipulnsward@gmail.com> | 2016-08-19 19:38:26 +0530 |
---|---|---|
committer | Vipul A M <vipulnsward@gmail.com> | 2016-11-12 15:47:39 -0500 |
commit | 89fab56597c335bb49887563b9a98386b5171574 (patch) | |
tree | 36d593befb78ec7938780687bdc81014f880546e /activesupport | |
parent | 26dd9b26ab7317f94fd285245879e888344143b2 (diff) | |
download | rails-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 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/tagged_logging.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/activesupport/lib/active_support/tagged_logging.rb b/activesupport/lib/active_support/tagged_logging.rb index 6836378943..ad134c49b6 100644 --- a/activesupport/lib/active_support/tagged_logging.rb +++ b/activesupport/lib/active_support/tagged_logging.rb @@ -48,13 +48,12 @@ module ActiveSupport Thread.current[thread_key] ||= [] end - private - def tags_text - tags = current_tags - if tags.any? - tags.collect { |tag| "[#{tag}] " }.join - end + def tags_text + tags = current_tags + if tags.any? + tags.collect { |tag| "[#{tag}] " }.join end + end end def self.new(logger) |