diff options
Diffstat (limited to 'lib/action_cable/channel')
-rw-r--r-- | lib/action_cable/channel/base.rb | 6 | ||||
-rw-r--r-- | lib/action_cable/channel/redis.rb | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/action_cable/channel/base.rb b/lib/action_cable/channel/base.rb index 37399c8101..fac988ba52 100644 --- a/lib/action_cable/channel/base.rb +++ b/lib/action_cable/channel/base.rb @@ -11,7 +11,7 @@ module ActionCable on_unsubscribe :disconnect attr_reader :params, :connection - delegate :log_info, :log_error, to: :connection + delegate :logger, to: :connection class_attribute :channel_name @@ -41,7 +41,7 @@ module ActionCable if respond_to?(:receive) receive(data) else - log_error "#{self.class.name} received data (#{data}) but #{self.class.name}#receive callback is not defined" + logger.error "#{self.class.name} received data (#{data}) but #{self.class.name}#receive callback is not defined" end else unauthorized @@ -67,7 +67,7 @@ module ActionCable end def unauthorized - log_error "Unauthorized access to #{self.class.name}" + logger.error "Unauthorized access to #{self.class.name}" end def connect diff --git a/lib/action_cable/channel/redis.rb b/lib/action_cable/channel/redis.rb index 197cf03c8e..cbc3512072 100644 --- a/lib/action_cable/channel/redis.rb +++ b/lib/action_cable/channel/redis.rb @@ -14,7 +14,7 @@ module ActionCable @_redis_channels ||= [] @_redis_channels << [ redis_channel, callback ] - log_info "Subscribing to the redis channel: #{redis_channel}" + logger.info "Subscribing to the redis channel: #{redis_channel}" pubsub.subscribe(redis_channel, &callback) end @@ -22,7 +22,7 @@ module ActionCable def unsubscribe_from_redis_channels if @_redis_channels @_redis_channels.each do |channel, callback| - log_info "Unsubscribing from the redis channel: #{channel}" + logger.info "Unsubscribing from the redis channel: #{channel}" pubsub.unsubscribe_proc(channel, callback) end end @@ -30,7 +30,7 @@ module ActionCable def default_subscription_callback(channel) -> (message) do - log_info "Received a message over the redis channel: #{channel} (#{message})" + logger.info "Received a message over the redis channel: #{channel} (#{message})" broadcast ActiveSupport::JSON.decode(message) end end |