Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/lograge/rails_ext/action_cable/channel/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ def notification_payload(method_name)
end
end

ActionCable::Channel::Base.prepend(Lograge::ActionCable::ChannelInstrumentation)

ActiveSupport.on_load(:action_cable_channel) do
ActionCable::Channel::Base.prepend(Lograge::ActionCable::ChannelInstrumentation)
end
4 changes: 3 additions & 1 deletion lib/lograge/rails_ext/action_cable/connection/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ def notification_payload(method_name)
end
end

ActionCable::Connection::Base.prepend(Lograge::ActionCable::ConnectionInstrumentation)
ActiveSupport.on_load(:action_cable_connection) do
ActionCable::Connection::Base.prepend(Lograge::ActionCable::ConnectionInstrumentation)
end
12 changes: 7 additions & 5 deletions lib/lograge/rails_ext/action_cable/server/base.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# frozen_string_literal: true

module ActionCable
module Server
class Base
mattr_accessor :logger
self.logger = Lograge::SilentLogger.new(config.logger)
ActiveSupport.on_load(:action_cable) do
module ActionCable
module Server
class Base
mattr_accessor :logger
self.logger = Lograge::SilentLogger.new(config.logger)
end
end
end
end