aboutsummaryrefslogtreecommitdiffstats
path: root/lib/action_cable/channel/base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/action_cable/channel/base.rb')
-rw-r--r--lib/action_cable/channel/base.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/action_cable/channel/base.rb b/lib/action_cable/channel/base.rb
index 8ee99649f4..37399c8101 100644
--- a/lib/action_cable/channel/base.rb
+++ b/lib/action_cable/channel/base.rb
@@ -11,6 +11,7 @@ module ActionCable
on_unsubscribe :disconnect
attr_reader :params, :connection
+ delegate :log_info, :log_error, to: :connection
class_attribute :channel_name
@@ -40,7 +41,7 @@ module ActionCable
if respond_to?(:receive)
receive(data)
else
- logger.error "[ActionCable] #{self.class.name} received data (#{data}) but #{self.class.name}#receive callback is not defined"
+ log_error "#{self.class.name} received data (#{data}) but #{self.class.name}#receive callback is not defined"
end
else
unauthorized
@@ -66,7 +67,7 @@ module ActionCable
end
def unauthorized
- logger.error "[ActionCable] Unauthorized access to #{self.class.name}"
+ log_error "Unauthorized access to #{self.class.name}"
end
def connect
@@ -101,10 +102,6 @@ module ActionCable
connection.worker_pool
end
- def logger
- connection.logger
- end
-
end
end