class Mongo::Monitoring::CommandLogSubscriber

Public Instance Methods

failed(event) click to toggle source
# File lib/rocket_job/extensions/mongo/logging.rb, line 19
def failed(event)
  logger.debug(message:  "#{prefix(event)} Failed: #{event.message}",
               duration: (event.duration * 1000),
               payload:  @event_command)
end
prefix(event) click to toggle source
# File lib/rocket_job/extensions/mongo/logging.rb, line 25
def prefix(event)
  "#{event.address} | #{event.database_name}.#{event.command_name}"
end
started(event) click to toggle source
# File lib/rocket_job/extensions/mongo/logging.rb, line 9
def started(event)
  @event_command = event.command
end
succeeded(event) click to toggle source
# File lib/rocket_job/extensions/mongo/logging.rb, line 13
def succeeded(event)
  logger.debug(message:  prefix(event),
               duration: (event.duration * 1000),
               payload:  @event_command)
end