Class: Mongo::Monitoring::CmapLogSubscriber
- Inherits:
-
Object
- Object
- Mongo::Monitoring::CmapLogSubscriber
- Includes:
- Loggable
- Defined in:
- build/ruby-driver-v2.19/lib/mongo/monitoring/cmap_log_subscriber.rb
Overview
Subscribes to CMAP events and logs them.
Constant Summary
Constants included from Loggable
Instance Attribute Summary collapse
-
#options ⇒ Hash
readonly
Options The options.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ CmapLogSubscriber
constructor
Create the new log subscriber.
-
#published(event) ⇒ Object
Handle a CMAP event.
Methods included from Loggable
#log_debug, #log_error, #log_fatal, #log_info, #log_warn, #logger
Constructor Details
#initialize(options = {}) ⇒ CmapLogSubscriber
Create the new log subscriber.
42 43 44 |
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/cmap_log_subscriber.rb', line 42 def initialize( = {}) @options = end |
Instance Attribute Details
#options ⇒ Hash (readonly)
Returns options The options.
30 31 32 |
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/cmap_log_subscriber.rb', line 30 def @options end |
Instance Method Details
#published(event) ⇒ Object
Handle a CMAP event.
51 52 53 |
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/cmap_log_subscriber.rb', line 51 def published(event) log_debug("EVENT: #{event.summary}") if logger.debug? end |