diff --git a/activesupport/lib/active_support/tagged_logging.rb b/activesupport/lib/active_support/tagged_logging.rb index dc3ca2593850d62b4f860138c0badf6820dc42cf..4e2e1a1ff5d480eb391fa904f951e778bcbbb983 100644 --- a/activesupport/lib/active_support/tagged_logging.rb +++ b/activesupport/lib/active_support/tagged_logging.rb @@ -14,7 +14,6 @@ module ActiveSupport class TaggedLogging def initialize(logger) @logger = logger - @tags = Hash.new { |h,k| h[k] = [] } end def tagged(*new_tags) @@ -39,7 +38,7 @@ def #{severity}(progname = nil, &block) # def warn(progname = nil, end def flush - @tags.delete(Thread.current) + current_tags.clear @logger.flush if @logger.respond_to?(:flush) end @@ -57,7 +56,7 @@ def tags_text end def current_tags - @tags[Thread.current] + Thread.current[:activesupport_tagged_logging_tags] ||= [] end end end