From 717510757df8601e241a5cde9466e795ad2b661d Mon Sep 17 00:00:00 2001 From: Semyon Perepelitsa Date: Sat, 21 Jan 2012 17:34:04 +0800 Subject: Do not use the same Logger constant for class (from stdlib) and for instance (from the example) --- activesupport/lib/active_support/tagged_logging.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/tagged_logging.rb b/activesupport/lib/active_support/tagged_logging.rb index b60bc94db4..e4e61e2964 100644 --- a/activesupport/lib/active_support/tagged_logging.rb +++ b/activesupport/lib/active_support/tagged_logging.rb @@ -4,10 +4,10 @@ require 'logger' module ActiveSupport # Wraps any standard Logger class to provide tagging capabilities. Examples: # - # Logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT)) - # Logger.tagged("BCX") { Logger.info "Stuff" } # Logs "[BCX] Stuff" - # Logger.tagged("BCX", "Jason") { Logger.info "Stuff" } # Logs "[BCX] [Jason] Stuff" - # Logger.tagged("BCX") { Logger.tagged("Jason") { Logger.info "Stuff" } } # Logs "[BCX] [Jason] Stuff" + # LOGGER = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT)) + # LOGGER.tagged("BCX") { LOGGER.info "Stuff" } # Logs "[BCX] Stuff" + # LOGGER.tagged("BCX", "Jason") { LOGGER.info "Stuff" } # Logs "[BCX] [Jason] Stuff" + # LOGGER.tagged("BCX") { LOGGER.tagged("Jason") { LOGGER.info "Stuff" } } # Logs "[BCX] [Jason] Stuff" # # This is used by the default Rails.logger as configured by Railties to make it easy to stamp log lines # with subdomains, request ids, and anything else to aid debugging of multi-user production applications. -- cgit v1.2.3