You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After this Rails change rails/rails@9c58a54 (included in 7.1+) some ActionView::LogSubscriber-generated logs have been split out into a separate ActionView::LogSubscriber::Start subscriber. Unfortunately, this breaks lograge's unsubscription code invoked here:
since the condition is now false for the built-in Start subscriber, as the delegate is not equal to subscriber - it's an instance of ActionView::LogSubscriber::Start not ActionView::LogSubscriber. I assume this code is trying to only unsubscribe Rails' builtin log subscriber and not anything else that happens to be subscribed to the same event.
This has the effect of not silencing logs that were silenced in Rails 7.0.
Reproduction
Copy the following to repro.rb - it defines a minimal Rails app inline:
Background
After this Rails change rails/rails@9c58a54 (included in 7.1+) some
ActionView::LogSubscriber
-generated logs have been split out into a separateActionView::LogSubscriber::Start
subscriber. Unfortunately, this breaks lograge's unsubscription code invoked here:lograge/lib/lograge.rb
Lines 112 to 113 in 2839d2c
lograge/lib/lograge.rb
Line 124 in 2839d2c
Start
subscriber, as the delegate is not equal tosubscriber
- it's an instance ofActionView::LogSubscriber::Start
notActionView::LogSubscriber
. I assume this code is trying to only unsubscribe Rails' builtin log subscriber and not anything else that happens to be subscribed to the same event.This has the effect of not silencing logs that were silenced in Rails 7.0.
Reproduction
Copy the following to
repro.rb
- it defines a minimal Rails app inline:If we run
ruby repro.rb
and then curl the listening address (for me,curl http://0.0.0.0:9292
) I see these logs with Rails 7.0.8:whereas if I change 7.0.8 to 7.1.3 and follow the same process, I see these logs:
N.B. the additional debug logging.
The text was updated successfully, but these errors were encountered: