aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/log_subscriber
diff options
context:
space:
mode:
authorFrancesco Rodriguez <lrodriguezsanc@gmail.com>2012-09-14 22:54:39 -0500
committerFrancesco Rodriguez <lrodriguezsanc@gmail.com>2012-09-14 22:54:39 -0500
commitd48163c65d1f6f4cec433e2b5fc785246d03c4b6 (patch)
treee9d018673188dba16bfde59ea270708d59f99638 /activesupport/lib/active_support/log_subscriber
parent7ef21d80a3b58e5dc5a1e2c83e95ae0a34b786e0 (diff)
downloadrails-d48163c65d1f6f4cec433e2b5fc785246d03c4b6.tar.gz
rails-d48163c65d1f6f4cec433e2b5fc785246d03c4b6.tar.bz2
rails-d48163c65d1f6f4cec433e2b5fc785246d03c4b6.zip
update AS/log_subscriber and AS/multibyte docs [ci skip]
Diffstat (limited to 'activesupport/lib/active_support/log_subscriber')
-rw-r--r--activesupport/lib/active_support/log_subscriber/test_helper.rb19
1 files changed, 9 insertions, 10 deletions
diff --git a/activesupport/lib/active_support/log_subscriber/test_helper.rb b/activesupport/lib/active_support/log_subscriber/test_helper.rb
index b65ea6208c..63dad7e01a 100644
--- a/activesupport/lib/active_support/log_subscriber/test_helper.rb
+++ b/activesupport/lib/active_support/log_subscriber/test_helper.rb
@@ -23,15 +23,15 @@ module ActiveSupport
# end
# end
#
- # All you need to do is to ensure that your log subscriber is added to Rails::Subscriber,
- # as in the second line of the code above. The test helpers are responsible for setting
- # up the queue, subscriptions and turning colors in logs off.
- #
- # The messages are available in the @logger instance, which is a logger with limited
- # powers (it actually does not send anything to your output), and you can collect them
- # doing @logger.logged(level), where level is the level used in logging, like info,
- # debug, warn and so on.
+ # All you need to do is to ensure that your log subscriber is added to
+ # Rails::Subscriber, as in the second line of the code above. The test
+ # helpers are responsible for setting up the queue, subscriptions and
+ # turning colors in logs off.
#
+ # The messages are available in the @logger instance, which is a logger with
+ # limited powers (it actually does not send anything to your output), and
+ # you can collect them doing @logger.logged(level), where level is the level
+ # used in logging, like info, debug, warn and so on.
module TestHelper
def setup
@logger = MockLogger.new
@@ -91,12 +91,11 @@ module ActiveSupport
@notifier.wait
end
- # Overwrite if you use another logger in your log subscriber:
+ # Overwrite if you use another logger in your log subscriber.
#
# def logger
# ActiveRecord::Base.logger = @logger
# end
- #
def set_logger(logger)
ActiveSupport::LogSubscriber.logger = logger
end