Module: Yank::Logging

Included in:
Git, Nexus, Yank
Defined in:
lib/logging.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.configure_logger_for(classname) ⇒ Object



17
18
19
20
21
22
# File 'lib/logging.rb', line 17

def configure_logger_for(classname)
  logger = Logger.new(STDOUT)
  logger.progname = classname
  logger.level = $yank_debug || Logger::INFO
  logger
end

.logger_for(classname) ⇒ Object



13
14
15
# File 'lib/logging.rb', line 13

def logger_for(classname)
  @loggers[classname] ||= configure_logger_for(classname)
end

Instance Method Details

#loggerObject



5
6
7
# File 'lib/logging.rb', line 5

def logger
  @logger ||= Logging.logger_for(self.class.name)
end