Module: RSI::Loggable
- Included in:
- DefaultTextAnalyzer, Dictionary, Indexer, Query
- Defined in:
- lib/rsi/logmanager.rb
Overview
Mixin providing a RSI::LogManager-managed #logger() method. #logger() returns a Logger object.
class StuffThing
include RSI::Loggable
def do_dealie()
logger.info( "Doing some dealie" )
end
end
The settings of the logger returned by #logger() can be modified:
def initialize()
logger.level = Logger.DEBUG # log all messages
logger.debug( "This will show up in the log, now" )
end
Instance Method Summary collapse
Instance Method Details
#logger ⇒ Object
26 27 28 |
# File 'lib/rsi/logmanager.rb', line 26 def logger return RSI::LogManager.instance().logger_for( self ) end |