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