Method: CliUI::Loggable.logger_for

Defined in:
lib/cli_ui/loggable.rb

.logger_for(classname) ⇒ Object

Return the logger for a specific Class. If the instance is not found, creates it.

Parameters:

  • classname (String)

    the name of the class for which a logger instance must be retrieved

Returns:

  • (Object)

    the instance of the logger class for the specified Class



41
42
43
# File 'lib/cli_ui/loggable.rb', line 41

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