class Mongo::Monitoring::CommandLogSubscriber
Public Instance Methods
failed(event)
click to toggle source
# File lib/rocket_job/extensions/mongo/logging.rb, line 22 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 29 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 10 def started(event) @event_command = event.command end
succeeded(event)
click to toggle source
# File lib/rocket_job/extensions/mongo/logging.rb, line 15 def succeeded(event) logger.debug(message: prefix(event), duration: (event.duration * 1000), payload: @event_command) end