Class: Mongo::Monitoring::SDAMLogSubscriber
- Inherits:
-
Object
- Object
- Mongo::Monitoring::SDAMLogSubscriber
- Includes:
- Loggable
- Defined in:
- build/ruby-driver-v2.19/lib/mongo/monitoring/sdam_log_subscriber.rb
Overview
Subscribes to SDAM events and logs them.
Direct Known Subclasses
ServerClosedLogSubscriber, ServerDescriptionChangedLogSubscriber, ServerOpeningLogSubscriber, TopologyChangedLogSubscriber, TopologyClosedLogSubscriber, TopologyOpeningLogSubscriber
Constant Summary
Constants included from Loggable
Instance Attribute Summary collapse
-
#options ⇒ Hash
readonly
Options The options.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ SDAMLogSubscriber
constructor
Create the new log subscriber.
-
#succeeded(event) ⇒ Object
Handle the SDAM succeeded event.
Methods included from Loggable
#log_debug, #log_error, #log_fatal, #log_info, #log_warn, #logger
Constructor Details
#initialize(options = {}) ⇒ SDAMLogSubscriber
Create the new log subscriber.
40 41 42 |
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/sdam_log_subscriber.rb', line 40 def initialize( = {}) @options = end |
Instance Attribute Details
#options ⇒ Hash (readonly)
Returns options The options.
28 29 30 |
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/sdam_log_subscriber.rb', line 28 def @options end |
Instance Method Details
#succeeded(event) ⇒ Object
Handle the SDAM succeeded event.
52 53 54 |
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/sdam_log_subscriber.rb', line 52 def succeeded(event) log_event(event) if logger.debug? end |