Solves: "gems/mongo-1.6.0/lib/mongo/util/logging.rb:34:in `instrument': undefined method `level' for #<Mongoid::Logger:0x00000103ca7570> (NoMethodError)"
This commit is contained in:
parent
32117ac91c
commit
775ed49e6c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue