From 038cbea739f50b8579a5405aa85f5702f8d6117c Mon Sep 17 00:00:00 2001 From: Tyler Brock Date: Thu, 23 Feb 2012 11:52:09 -0500 Subject: [PATCH] Revert "Solves: "gems/mongo-1.6.0/lib/mongo/util/logging.rb:34:in `instrument': undefined method `level' for # (NoMethodError)"" This reverts commit 775ed49e6cbd3554a130b5122d0d4ac4e3e5e862. a logger should quack like a logger --- lib/mongo/util/logging.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mongo/util/logging.rb b/lib/mongo/util/logging.rb index 8850ec6..eed04e3 100644 --- a/lib/mongo/util/logging.rb +++ b/lib/mongo/util/logging.rb @@ -31,7 +31,7 @@ module Mongo def instrument(name, payload = {}, &blk) start_time = Time.now res = yield - if @logger && @logger.respond_to?("level") && (@logger.level == DEBUG_LEVEL) + if @logger && (@logger.level == DEBUG_LEVEL) log_operation(name, payload, start_time) end res