-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable subclasses to configure level isolation (#103)
`Logger#with_level` was recently added to enable configuring a `Logger`'s level for the duration of a block. However, the configured level is always tied to the currently running `Fiber`, which is not always ideal in applications that mix `Thread`s and `Fiber`s. For example, Active Support has provided a similar feature (`ActiveSupport::Logger#log_at`) which, depending on configuration, can be isolated to either `Thread`s or `Fiber`s. This commit enables subclasses of `Logger` to customize the level isolation. Ideally, it will enable replacing most of Active Support's `#log_at`, since both methods end up serving the same purpose.
- Loading branch information
1 parent
d1d704a
commit dae2b83
Showing
2 changed files
with
47 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters