From 89fab56597c335bb49887563b9a98386b5171574 Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Fri, 19 Aug 2016 19:38:26 +0530 Subject: 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 --- activesupport/lib/active_support/tagged_logging.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'activesupport') 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) -- cgit v1.2.3