aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-02 19:55:29 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-02 19:55:29 -0300
commiteed68fddee6477ce1e8365d2b495310ef4903621 (patch)
treead2e9b5f76b3e359abb98cc44bb57505cb3d3fbe /activesupport/lib/active_support
parent734d97d292b4f04c13f03625e07f2888e88b0649 (diff)
parent7cd0b7982520e410494e834edaa9be855d2920ad (diff)
downloadrails-eed68fddee6477ce1e8365d2b495310ef4903621.tar.gz
rails-eed68fddee6477ce1e8365d2b495310ef4903621.tar.bz2
rails-eed68fddee6477ce1e8365d2b495310ef4903621.zip
Merge pull request #9065 from atombender/master
Fix TaggedLogging to allow loggers to be instantiated multiple times without having to share the stack of tags
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/tagged_logging.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/tagged_logging.rb b/activesupport/lib/active_support/tagged_logging.rb
index d5c2222d2e..9086a959aa 100644
--- a/activesupport/lib/active_support/tagged_logging.rb
+++ b/activesupport/lib/active_support/tagged_logging.rb
@@ -43,7 +43,9 @@ module ActiveSupport
end
def current_tags
- Thread.current[:activesupport_tagged_logging_tags] ||= []
+ # We use our object ID here to void conflicting with other instances
+ thread_key = @thread_key ||= "activesupport_tagged_logging_tags:#{object_id}".freeze
+ Thread.current[thread_key] ||= []
end
private