Repository navigation
Deprecate ActiveSupport::LogSubscriber.colorize_logging - #59628
Open
thomasklemm wants to merge 1 commit into
Open
thomasklemm wants to merge 1 commit into
thomasklemm wants to merge 1 commit into
Conversation
The class-level accessor went away without a deprecation when color logging moved to ActiveSupport::ColorizeLogging, so gems that read it while loading, such as awesome_print, raised NoMethodError. Bring it back as a deprecated reader and writer that delegate to ActiveSupport.colorize_logging.
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Through 8.1,
ActiveSupport::LogSubscriberdeclaredmattr_accessor :colorize_logging. aebcb61 moved color logging intoActiveSupport::ColorizeLoggingand the setting toActiveSupport.colorize_logging. The instance reader survived, but the class-level reader and writer went away without a deprecation.Gems still call it. awesome_print 1.9.2, the latest stable release, runs this when it loads:
On main that raises
NoMethodErrorinsideBundler.require, so apps that load awesome_print fail to boot. administrate's example app is one.This brings back
LogSubscriber.colorize_loggingandcolorize_logging=as deprecated methods that delegate toActiveSupport.colorize_logging, so the old and new names cannot disagree. They warn and will be removed in Rails 9.0. The test sets the value through each name, reads it back through the other, and restores it.Found by running the test suites of widely used gems on Rails main and 8-1-stable side by side (record, part of my research project Lowrail).