Fixes issue with Rails 7.1. Previous fix sets Anycable.logger to an instance of BroadcastLogger with two loggers (console and previous instance of BroadcastLogger). This nested BroadcastLogger breaks with following error:
undefined method `current_tags' for nil:NilClass:
/Users/iuri/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/actioncable-7.1.1/lib/action_cable/connection/tagged_logger_proxy.rb:25:in `tag'
/Users/iuri/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/actioncable-7.1.1/lib/action_cable/connection/tagged_logger_proxy.rb:40:in `log'
/Users/iuri/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/actioncable-7.1.1/lib/action_cable/connection/tagged_logger_proxy.rb:34:in `block (2 levels) in <class:TaggedLoggerProxy>'
/Users/iuri/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/anycable-rails-core-1.4.1/lib/anycable/rails/connection.rb:89:in `handle_open'
...
What is the purpose of this pull request?
Fixes issue with Rails 7.1. Previous fix sets
Anycable.logger
to an instance ofBroadcastLogger
with two loggers (console
and previous instance ofBroadcastLogger
). This nestedBroadcastLogger
breaks with following error:What changes did you make? (overview)
Use official
#broadcast_to
APIIs there anything you'd like reviewers to focus on?
Checklist