Skip to content

Commit

Permalink
Update requires in LoggerThreadSafeLevel
Browse files Browse the repository at this point in the history
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]: 629efb6
[2]: 2379bc5
[3]: 56ec504
  • Loading branch information
skipkayhil committed Sep 25, 2023
1 parent d8391b2 commit 0f5e7a6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions 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:
Expand Down

0 comments on commit 0f5e7a6

Please sign in to comment.