Permalink
Browse files

remove more uses of deprecated loggers

  • Loading branch information...
1 parent b31c2ed commit c056787d5de2f3fb5c050c432d3eff3cdade09a3 @Karunakar Karunakar committed Dec 20, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/test/cases/base_test.rb
@@ -1914,7 +1914,7 @@ def test_silence_sets_log_level_back_to_level_before_yield
def test_benchmark_with_log_level
original_logger = ActiveRecord::Base.logger
log = StringIO.new
- ActiveRecord::Base.logger = Logger.new(log)
+ ActiveRecord::Base.logger = ActiveSupport::Logger.new(log)
ActiveRecord::Base.logger.level = Logger::WARN
ActiveRecord::Base.benchmark("Debug Topic Count", :level => :debug) { Topic.count }
ActiveRecord::Base.benchmark("Warn Topic Count", :level => :warn) { Topic.count }
@@ -1929,7 +1929,7 @@ def test_benchmark_with_log_level
def test_benchmark_with_use_silence
original_logger = ActiveRecord::Base.logger
log = StringIO.new
- ActiveRecord::Base.logger = Logger.new(log)
+ ActiveRecord::Base.logger = ActiveSupport::Logger.new(log)
ActiveRecord::Base.benchmark("Logging", :level => :debug, :silence => false) { ActiveRecord::Base.logger.debug "Quiet" }
assert_match(/Quiet/, log.string)
ensure

0 comments on commit c056787

Please sign in to comment.