Permalink
Browse files

Do not use the same Logger constant for class (from stdlib) and for i…

…nstance (from the example)
  • Loading branch information...
1 parent ecac7c9 commit 717510757df8601e241a5cde9466e795ad2b661d @semaperepelitsa semaperepelitsa committed Jan 21, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 activesupport/lib/active_support/tagged_logging.rb
View
8 activesupport/lib/active_support/tagged_logging.rb
@@ -4,10 +4,10 @@
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.

0 comments on commit 7175107

Please sign in to comment.