Skip to content

Commit

Permalink
Better ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
dhh committed Jun 27, 2015
1 parent 3dd19d9 commit 78f3c88
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions lib/action_cable/connection/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def cookies
attr_reader :websocket
attr_reader :heartbeat, :subscriptions, :message_buffer


def websocket_initialization
@websocket = Faye::WebSocket.new(@env)
end
Expand Down Expand Up @@ -125,6 +124,12 @@ def respond_to_invalid_request
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,
Expand All @@ -141,13 +146,6 @@ def finished_request_message
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

0 comments on commit 78f3c88

Please sign in to comment.