diff --git a/lib/anycable/rails/railtie.rb b/lib/anycable/rails/railtie.rb index fd1b164..a53b057 100644 --- a/lib/anycable/rails/railtie.rb +++ b/lib/anycable/rails/railtie.rb @@ -33,8 +33,10 @@ class Railtie < ::Rails::Railtie # :nodoc: # Rails 7.1+ if AnyCable.logger.respond_to?(:broadcast_to) AnyCable.logger.broadcast_to(console) - else + elsif ActiveSupport::Logger.respond_to?(:broadcast) AnyCable.logger.extend(ActiveSupport::Logger.broadcast(console)) + elsif defined?(ActiveSupport::BroadcastLogger) + AnyCable.logger = ActiveSupport::BroadcastLogger.new(AnyCable.logger, console) end end