Skip to content

Conversation

@pboling
Copy link

@pboling pboling commented Nov 21, 2024

Since Rails uses autoloading, there is no need to explicitly require active_support/tagged_logging, and doing so actively prevents using an alternative.

I have created a suite of gems that replace the Rails logger. They extract the logging tooling from Rails 8, add in some refactoring and fixes that allow broadcasting, tagged logging, and blocks, to all work together, (which bugs have always been present in tagged logging, and remain in v8.0, see Rails PR 53093 and Rails PR 53105).

It works with Rails because of the autoloading. If a namespace / constant is already defined, it won't go looking for it. So by defining it in my extracted gems, the vanilla (broken) Rails version doesn't load.

At that point the only problem comes from libraries which load certain Rails internals explicitly.

The suite of gems I'm aiming to have compatibility with is:

@pboling pboling merged commit 76da9ee into VitalConnectInc:main Nov 21, 2024
@pboling pboling deleted the support-alternative-loggers branch November 21, 2024 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants