Sha256: 4ff21c98c7e0535930277b2fd25ebac7e4680f9fc202117ff21741895baf1f29

Contents?: true

Size: 418 Bytes

Versions: 4

Compression:

Stored size: 418 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

    private

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

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rocketjob-2.1.3 lib/rocket_job/extensions/mongo.rb
rocketjob-2.1.2 lib/rocket_job/extensions/mongo.rb
rocketjob-2.1.1 lib/rocket_job/extensions/mongo.rb
rocketjob-2.0.0 lib/rocket_job/extensions/mongo.rb