Module: Citronella::Log

Defined in:
lib/logger.rb

Class Method Summary collapse

Class Method Details

.logger(logger, class_name, function_name, name) ⇒ Object

A wrapper for UI methods.

Parameters:

  • logger (Boolean)

    Flag indicating whether to log actions.

  • class_name (String)

    The name of the class.

  • function_name (String)

    The name of the function.

  • name (String)

    The name of the action.



35
36
37
38
39
# File 'lib/logger.rb', line 35

def self.logger(logger, class_name, function_name, name)
  if logger
    Logger.new(STDOUT, level: Logger::INFO).info("#{class_name} => #{function_name} => #{name}")
  end
end