class Mongo::Monitoring::CmapLogSubscriber
Subscribes to CMAP events and logs them.
@since 2.9.0
Attributes
options[R]
@return [ Hash ] options The options.
@since 2.9.0
Public Class Methods
new(options = {})
click to toggle source
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
# File lib/mongo/monitoring/cmap_log_subscriber.rb, line 39 def initialize(options = {}) @options = options end
Public Instance Methods
published(event)
click to toggle source
Handle a CMAP event.
@param [ Event
] event The event.
@since 2.9.0
# File lib/mongo/monitoring/cmap_log_subscriber.rb, line 48 def published(event) log_debug("EVENT: #{event.summary}") if logger.debug? end