From 775ed49e6cbd3554a130b5122d0d4ac4e3e5e862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20Pa=C5=A1ali=C4=87?= Date: Wed, 22 Feb 2012 21:26:59 +0100 Subject: [PATCH] Solves: "gems/mongo-1.6.0/lib/mongo/util/logging.rb:34:in `instrument': undefined method `level' for # (NoMethodError)" --- 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 eed04e3..8850ec6 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.level == DEBUG_LEVEL) + if @logger && @logger.respond_to?("level") && (@logger.level == DEBUG_LEVEL) log_operation(name, payload, start_time) end res