From 4cef27aacffb2ce5aada0c7199e9eb8787291baf Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 27 Jun 2015 15:59:12 +0200 Subject: Explain the purpose --- lib/action_cable/connection/tagged_logger_proxy.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/action_cable/connection/tagged_logger_proxy.rb b/lib/action_cable/connection/tagged_logger_proxy.rb index e9e12e2672..e0c0075adf 100644 --- a/lib/action_cable/connection/tagged_logger_proxy.rb +++ b/lib/action_cable/connection/tagged_logger_proxy.rb @@ -1,5 +1,8 @@ module ActionCable module Connection + # Allows the use of per-connection tags against the server logger. This wouldn't work using the tradional + # ActiveSupport::TaggedLogging-enhanced Rails.logger, as that logger will reset the tags between requests. + # The connection is long-lived, so it needs its own set of tags for its independent duration. class TaggedLoggerProxy def initialize(logger, tags:) @logger = logger -- cgit v1.2.3