aboutsummaryrefslogtreecommitdiffstats
path: root/lib/action_cable/connection/tagged_logger_proxy.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2015-06-27 15:59:12 +0200
committerDavid Heinemeier Hansson <david@loudthinking.com>2015-06-27 15:59:12 +0200
commit4cef27aacffb2ce5aada0c7199e9eb8787291baf (patch)
tree4ada1dd19c5c99bd333f2235407af0891b606ff1 /lib/action_cable/connection/tagged_logger_proxy.rb
parentb48b2c506f4bde3863b88a7ef71c83f09a86eb92 (diff)
downloadrails-4cef27aacffb2ce5aada0c7199e9eb8787291baf.tar.gz
rails-4cef27aacffb2ce5aada0c7199e9eb8787291baf.tar.bz2
rails-4cef27aacffb2ce5aada0c7199e9eb8787291baf.zip
Explain the purpose
Diffstat (limited to 'lib/action_cable/connection/tagged_logger_proxy.rb')
-rw-r--r--lib/action_cable/connection/tagged_logger_proxy.rb3
1 files changed, 3 insertions, 0 deletions
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