class Log

Defines a comfortable way to use logging.

Public Class Methods

log() click to toggle source
# File lib/hodmin/hodmin_tools.rb, line 3
def self.log
  if @logger.nil?
    log = case configatron.logging.logdestination
          when 'STDOUT' then STDOUT
          when 'nil' then nil
          else configatron.logging.logdestination.to_s
          end
    @logger = Logger.new(log)
    @logger.level = Logger::DEBUG
    @logger.datetime_format = '%Y-%m-%d %H:%M:%S '
  end
  @logger
end