Module: Mongoid::Loggable
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Extended In:
| |
Defined in: | lib/mongoid/loggable.rb |
Overview
Contains logging behavior.
Instance Attribute Summary
-
#logger ⇒ Logger
rw
Get the logger.
-
#logger=(logger) ⇒ Logger
rw
::Set
the logger.
Instance Method Summary
-
#default_logger ⇒ Logger
private
Internal use only
Internal use only
Gets the default
::Mongoid
logger - stderr. - #rails_logger ⇒ Logger private Internal use only Internal use only
Instance Attribute Details
#logger ⇒ Logger
(rw)
Note:
Will try to grab Rails’ logger first before creating a new logger with stderr.
Get the logger.
# File 'lib/mongoid/loggable.rb', line 18
def logger return @logger if defined?(@logger) @logger = rails_logger || default_logger end
#logger=(logger) ⇒ Logger
(rw)
::Set
the logger.
Instance Method Details
#default_logger ⇒ Logger
(private)
This method is for internal use only.
Gets the default ::Mongoid
logger - stderr.
#rails_logger ⇒ Logger
(private)
This method is for internal use only.
[ GitHub ]