Class: Mongo::Monitoring::SDAMLogSubscriber
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Super Chains via Extension / Inclusion / Inheritance | |
Instance Chain:
self,
::Mongo::Loggable
|
|
Inherits: | Object |
Defined in: | lib/mongo/monitoring/sdam_log_subscriber.rb |
Overview
Subscribes to SDAM events and logs them.
Constant Summary
::Mongo::Loggable
- Included
Class Method Summary
-
.new(options = {}) ⇒ SDAMLogSubscriber
constructor
Create the new log subscriber.
Instance Attribute Summary
- #options ⇒ Hash readonly
Instance Method Summary
-
#succeeded(event)
Handle the SDAM succeeded event.
::Mongo::Loggable
- Included
#log_debug | Convenience method to log debug messages with the standard prefix. |
#log_error | Convenience method to log error messages with the standard prefix. |
#log_fatal | Convenience method to log fatal messages with the standard prefix. |
#log_info | Convenience method to log info messages with the standard prefix. |
#log_warn | Convenience method to log warn messages with the standard prefix. |
#logger | Get the logger instance. |
#_mongo_log_prefix, #format_message |
Constructor Details
.new(options = {}) ⇒ SDAMLogSubscriber
Create the new log subscriber.
# File 'lib/mongo/monitoring/sdam_log_subscriber.rb', line 40
def initialize( = {}) @options = end
Instance Attribute Details
#options ⇒ Hash
(readonly)
# File 'lib/mongo/monitoring/sdam_log_subscriber.rb', line 28
attr_reader :
Instance Method Details
#succeeded(event)
Handle the SDAM succeeded event.
# File 'lib/mongo/monitoring/sdam_log_subscriber.rb', line 52
def succeeded(event) log_event(event) if logger.debug? end