Class: Mongoid::Logger
Overview
The Mongoid logger which wraps some other ruby compliant logger class.
Instance Method Summary collapse
-
#inspect ⇒ String
Inspect the logger.
-
#logger ⇒ Logger
Get the mongoid logger.
-
#warn(message) ⇒ Object
Emit a warning log message.
Instance Method Details
#inspect ⇒ String
Inspect the logger.
35 36 37 |
# File 'lib/mongoid/logger.rb', line 35 def inspect "#<Mongoid::Logger:0x#{object_id.to_s(16)} @logger=#{logger.inspect}>" end |
#logger ⇒ Logger
Get the mongoid logger.
25 26 27 |
# File 'lib/mongoid/logger.rb', line 25 def logger Mongoid.logger end |
#warn(message) ⇒ Object
Emit a warning log message.
15 16 17 |
# File 'lib/mongoid/logger.rb', line 15 def warn() logger.warn() if logger && logger.respond_to?(:warn) end |