Class: Mongo::Logger
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/mongo/logger.rb |
Overview
Provides ability to log messages.
Class Attribute Summary
-
.level ⇒ Integer
rw
Get the global logger level.
-
.level=(level) ⇒ Integer
rw
Set the global logger level.
-
.logger ⇒ ::Logger
rw
Get the wrapped logger.
-
.logger=(other) ⇒ ::Logger
rw
Set the logger.
Class Method Summary
- .default_logger private
Class Attribute Details
.level ⇒ Integer
(rw)
Get the global logger level.
# File 'lib/mongo/logger.rb', line 62
def level logger.level end
.level=(level) ⇒ Integer
(rw)
Set the global logger level.
.logger ⇒ ::Logger
(rw)
Get the wrapped logger. If none was set will return a default info level logger.
# File 'lib/mongo/logger.rb', line 36
def logger @logger ||= default_logger end
.logger=(other) ⇒ ::Logger
(rw)
Set the logger.
# File 'lib/mongo/logger.rb', line 50
def logger=(other) @logger = other end