From 0f5e7a66143a8f59a7f0f03b79c7f5c1015f3850 Mon Sep 17 00:00:00 2001 From: Hartley McGuire Date: Sun, 24 Sep 2023 21:34:49 -0400 Subject: [PATCH] Update requires in LoggerThreadSafeLevel The `concurrent` require was [added][1] previously because a `Concurrent::Map` was added to hold all of the log levels by `Thread` id. However, the `Map` was later [removed][2] by storing the log levels in the `Thread` locals (and later in `IsolatedExecutionState`) instead. The new implementation additionally removed the `cattr_accessor` (removing the need to require the "attribute_accessors" core_ext) and also replaced the [usage][3] of `Fiber` with `Thread` (so the require for `Fiber` is also no longer necessary). Since `Concurrent`, `Fiber`, and `cattr_accessor` are no longer used here, we can remove the requires. Since `Logger` is used here (but was previously required by `concurrent`), a require was added for it. [1]: 629efb605728b31ad9644f6f0acaf3760b641a29 [2]: 2379bc5d2a7d9580f270eebfde87d9f94b3da6c9 [3]: 56ec504db6c130d448ffc1d68c9fdd95fdfc1130 --- activesupport/lib/active_support/logger_thread_safe_level.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/activesupport/lib/active_support/logger_thread_safe_level.rb b/activesupport/lib/active_support/logger_thread_safe_level.rb index 38142bfe70502..cc2e46b0da728 100644 --- a/activesupport/lib/active_support/logger_thread_safe_level.rb +++ b/activesupport/lib/active_support/logger_thread_safe_level.rb @@ -1,9 +1,7 @@ # frozen_string_literal: true require "active_support/concern" -require "active_support/core_ext/module/attribute_accessors" -require "concurrent" -require "fiber" +require "logger" module ActiveSupport module LoggerThreadSafeLevel # :nodoc: