class Mongo::Monitoring::SDAMLogSubscriber

Subscribes to SDAM events and logs them.

@since 2.4.0

Attributes

options[R]

@return [ Hash ] options The options.

Public Class Methods

new(options = {}) click to toggle source

Create the new log subscriber.

@example Create the log subscriber.

SDAMLogSubscriber.new

@param [ Hash ] options The options.

@option options [ Logger ] :logger An optional custom logger.

@since 2.4.0

# File lib/mongo/monitoring/sdam_log_subscriber.rb, line 37
def initialize(options = {})
  @options = options
end

Public Instance Methods

succeeded(event) click to toggle source

Handle the SDAM succeeded event.

@example Handle the event.

subscriber.succeeded(event)

@param [ Event ] event The event.

@since 2.4.0

# File lib/mongo/monitoring/sdam_log_subscriber.rb, line 49
def succeeded(event)
  log_event(event) if logger.debug?
end