Merge pull request #92 from Krule/master

Logger complaining about missing method using mongoid and rails 3.1.2
This commit is contained in:
Tyler Brock 2012-02-22 15:44:44 -08:00
commit 87fd68e9d9
1 changed files with 1 additions and 1 deletions

View File

@ -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