Module: Mongoid::Loggable
- Included in:
- Mongoid, Clients::Factory
- Defined in:
- lib/mongoid/loggable.rb
Overview
Contains logging behavior.
Instance Method Summary collapse
-
#logger ⇒ Logger
Get the logger.
-
#logger=(logger) ⇒ Logger
Set the logger.
Instance Method Details
#logger ⇒ Logger
Note:
Will try to grab Rails’ logger first before creating a new logger with stderr.
Get the logger.
18 19 20 21 |
# File 'lib/mongoid/loggable.rb', line 18 def logger return @logger if defined?(@logger) @logger = rails_logger || default_logger end |
#logger=(logger) ⇒ Logger
Set the logger.
31 32 33 |
# File 'lib/mongoid/loggable.rb', line 31 def logger=(logger) @logger = logger end |