diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2015-06-20 18:09:58 +0200 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2015-06-20 18:09:58 +0200 |
commit | 9886a995f5f0b32d0d400074c48221cb0f6b911e (patch) | |
tree | 236ccfdd10d0ee9ab0f3156d71a8ed8a0f6dcd29 /lib | |
parent | fb18f809e0e38b43d29ca6ce786a80448abe2fe2 (diff) | |
download | rails-9886a995f5f0b32d0d400074c48221cb0f6b911e.tar.gz rails-9886a995f5f0b32d0d400074c48221cb0f6b911e.tar.bz2 rails-9886a995f5f0b32d0d400074c48221cb0f6b911e.zip |
Better logging
Diffstat (limited to 'lib')
-rw-r--r-- | lib/action_cable/channel/base.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/action_cable/channel/base.rb b/lib/action_cable/channel/base.rb index 83ba2cb3d2..12a5789bdc 100644 --- a/lib/action_cable/channel/base.rb +++ b/lib/action_cable/channel/base.rb @@ -42,10 +42,10 @@ module ActionCable action = extract_action(data) if performable_action?(action) - logger.info channel_name + compose_signature(action, data) + logger.info action_signature(action, data) public_send action, data else - logger.error "#{channel_name} failed to process #{compose_signature(action, data)}" + logger.error "Unable to process #{action_signature(action, data)}" end else unauthorized @@ -102,8 +102,8 @@ module ActionCable self.class.instance_methods(false).include?(action) end - def compose_signature(action, data) - "##{action}".tap do |signature| + def action_signature(action, data) + "#{channel_name}##{action}".tap do |signature| if (arguments = data.except('action')).any? signature << "(#{arguments.inspect})" end |