diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-02 19:55:29 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-02 19:55:29 -0300 |
commit | eed68fddee6477ce1e8365d2b495310ef4903621 (patch) | |
tree | ad2e9b5f76b3e359abb98cc44bb57505cb3d3fbe /activesupport/lib | |
parent | 734d97d292b4f04c13f03625e07f2888e88b0649 (diff) | |
parent | 7cd0b7982520e410494e834edaa9be855d2920ad (diff) | |
download | rails-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')
-rw-r--r-- | activesupport/lib/active_support/tagged_logging.rb | 4 |
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 |