class Mongo::Monitoring::CmapLogSubscriber
Subscribes to CMAP events and logs them.
@since 2.9.0
Attributes
@return [ Hash ] options The options.
@since 2.9.0
Public Class Methods
Source
# File lib/mongo/monitoring/cmap_log_subscriber.rb, line 39 def initialize(options = {}) @options = options end
Create the new log subscriber.
@example Create the log subscriber.
CmapLogSubscriber.new
@param [ Hash ] options The options.
@option options [ Logger
] :logger An optional custom logger.
@since 2.9.0
Public Instance Methods
Source
# File lib/mongo/monitoring/cmap_log_subscriber.rb, line 48 def published(event) log_debug("EVENT: #{event.summary}") if logger.debug? end
Handle a CMAP event.
@param [ Event
] event The event.
@since 2.9.0