From 85272d8a91aa2a08a4f83100e24cb1b0c8c9ccf3 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 26 Jun 2015 19:11:21 +0200 Subject: Don't need a log_exception helper, just do it inline --- lib/action_cable/connection/base.rb | 4 ---- lib/action_cable/connection/subscriptions.rb | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) (limited to 'lib/action_cable/connection') diff --git a/lib/action_cable/connection/base.rb b/lib/action_cable/connection/base.rb index fe5f058824..aac23b2596 100644 --- a/lib/action_cable/connection/base.rb +++ b/lib/action_cable/connection/base.rb @@ -142,10 +142,6 @@ module ActionCable end - def log_exception(e) - logger.error "Exception raised #{e.class} - #{e.message}: #{e.backtrace.first(5).join(" | ")}" - end - def log_tags server.log_tags.map { |tag| tag.respond_to?(:call) ? tag.call(request) : tag.to_s.camelize } end diff --git a/lib/action_cable/connection/subscriptions.rb b/lib/action_cable/connection/subscriptions.rb index e0a3a133c5..9e7a8a5f73 100644 --- a/lib/action_cable/connection/subscriptions.rb +++ b/lib/action_cable/connection/subscriptions.rb @@ -15,8 +15,7 @@ module ActionCable logger.error "Received unrecognized command in #{data.inspect}" end rescue Exception => e - logger.error "Could not execute command from #{data.inspect})" - connection.log_exception(e) + logger.error "Could not execute command from #{data.inspect}) [#{e.class} - #{e.message}]: #{e.backtrace.first(5).join(" | ")}" end def add(data) -- cgit v1.2.3