Sha256: b31a2be699335634563a406897778bbf51640d45dc4d58e3e8a478d6ce39f774

Contents?: true

Size: 422 Bytes

Versions: 1

Compression:

Stored size: 422 Bytes

Contents

require 'mongo'

Mongo::Logging
module Mongo
  module Logging

    # Remove annoying message on startup
    def write_logging_startup_message
    end

    # Cleanup output
    def log(level, msg)
      MongoClient.logger.send(level, msg)
    end

    protected

    def log_operation(name, payload, duration)
      MongoClient.logger.benchmark_trace(name, duration: (duration * 1000), payload: payload)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rocketjob-2.0.0.rc1 lib/rocket_job/extensions/mongo.rb