aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorSemyon Perepelitsa <sema@sema.in>2012-01-21 17:34:04 +0800
committerSemyon Perepelitsa <sema@sema.in>2012-01-21 17:34:04 +0800
commit717510757df8601e241a5cde9466e795ad2b661d (patch)
treee0e60b08a22d7cd1e4778bfbb95760c1a103b8c5 /activesupport
parentecac7c96451ee8d85ca602c9ce3416a5e7ef6a03 (diff)
downloadrails-717510757df8601e241a5cde9466e795ad2b661d.tar.gz
rails-717510757df8601e241a5cde9466e795ad2b661d.tar.bz2
rails-717510757df8601e241a5cde9466e795ad2b661d.zip
Do not use the same Logger constant for class (from stdlib) and for instance (from the example)
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/tagged_logging.rb8
1 files changed, 4 insertions, 4 deletions
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.