From 78f3c88d69741ffd9b24da8d362f3f7c4c8454f8 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 27 Jun 2015 16:27:08 +0200 Subject: Better ordering --- lib/action_cable/connection/base.rb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/action_cable/connection/base.rb b/lib/action_cable/connection/base.rb index ba1a486afb..ae9dd58ab4 100644 --- a/lib/action_cable/connection/base.rb +++ b/lib/action_cable/connection/base.rb @@ -78,7 +78,6 @@ module ActionCable attr_reader :websocket attr_reader :heartbeat, :subscriptions, :message_buffer - def websocket_initialization @websocket = Faye::WebSocket.new(@env) end @@ -125,6 +124,12 @@ module ActionCable end + # Tags are declared in the server but computed in the connection. This allows us per-connection tailored tags. + def initialize_tagged_logger + TaggedLoggerProxy.new server.logger, + tags: server.log_tags.map { |tag| tag.respond_to?(:call) ? tag.call(request) : tag.to_s.camelize } + end + def started_request_message 'Started %s "%s"%s for %s at %s' % [ request.request_method, @@ -141,13 +146,6 @@ module ActionCable request.ip, Time.now.to_default_s ] end - - - # Tags are declared in the server but computed in the connection. This allows us per-connection tailored tags. - def initialize_tagged_logger - TaggedLoggerProxy.new server.logger, - tags: server.log_tags.map { |tag| tag.respond_to?(:call) ? tag.call(request) : tag.to_s.camelize } - end end end end -- cgit v1.2.3