diff options
author | Rafael França <rafael@franca.dev> | 2019-07-24 16:28:56 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-24 16:28:56 -0400 |
commit | b1c27c059c88642aaf4a0c486320c03de4f165f6 (patch) | |
tree | e9d4ee89ef9ecbd6fdc9dbe27d68174fe0b26464 /activesupport/lib | |
parent | 96289cfb9b6aeb8f1a917f892148fd47f2f2049a (diff) | |
parent | 56ec504db6c130d448ffc1d68c9fdd95fdfc1130 (diff) | |
download | rails-b1c27c059c88642aaf4a0c486320c03de4f165f6.tar.gz rails-b1c27c059c88642aaf4a0c486320c03de4f165f6.tar.bz2 rails-b1c27c059c88642aaf4a0c486320c03de4f165f6.zip |
Merge pull request #36753 from cmrd-senya/36752-make-rails-logger-fiber-safe
Make ActiveSupport::Logger Fiber-safe
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/logger_thread_safe_level.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/logger_thread_safe_level.rb b/activesupport/lib/active_support/logger_thread_safe_level.rb index f16c90cfc6..1775a41492 100644 --- a/activesupport/lib/active_support/logger_thread_safe_level.rb +++ b/activesupport/lib/active_support/logger_thread_safe_level.rb @@ -3,6 +3,7 @@ require "active_support/concern" require "active_support/core_ext/module/attribute_accessors" require "concurrent" +require "fiber" module ActiveSupport module LoggerThreadSafeLevel # :nodoc: @@ -28,7 +29,7 @@ module ActiveSupport end def local_log_id - Thread.current.__id__ + Fiber.current.__id__ end def local_level |