Module: Logging
- Defined in:
- lib/logging.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.configure_logger_for(classname) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/logging.rb', line 15 def configure_logger_for(classname) logger = Logger.new(STDOUT) logger.progname = classname logger.level = Logger::INFO logger end |
.logger_for(classname) ⇒ Object
11 12 13 |
# File 'lib/logging.rb', line 11 def logger_for(classname) @loggers[classname] ||= configure_logger_for(classname) end |
Instance Method Details
#logger ⇒ Object
4 5 6 |
# File 'lib/logging.rb', line 4 def logger @logger ||= Logging.logger_for(self.class.name) end |