Class: Mongo::Logger
- Inherits:
-
Object
- Object
- Mongo::Logger
- Defined in:
- lib/mongo/logger.rb
Overview
Provides ability to log messages.
Class Method Summary collapse
-
.level ⇒ Integer
Get the global logger level.
-
.level=(level) ⇒ Integer
Set the global logger level.
-
.logger ⇒ ::Logger
Get the wrapped logger.
-
.logger=(other) ⇒ ::Logger
Set the logger.
Class Method Details
.level ⇒ Integer
Get the global logger level.
62 63 64 |
# File 'lib/mongo/logger.rb', line 62 def level logger.level end |
.level=(level) ⇒ Integer
Set the global logger level.
74 75 76 |
# File 'lib/mongo/logger.rb', line 74 def level=(level) logger.level = level end |
.logger ⇒ ::Logger
Get the wrapped logger. If none was set will return a default info level logger.
36 37 38 |
# File 'lib/mongo/logger.rb', line 36 def logger @logger ||= default_logger end |
.logger=(other) ⇒ ::Logger
Set the logger.
50 51 52 |
# File 'lib/mongo/logger.rb', line 50 def logger=(other) @logger = other end |