Module: HasLogger::InstanceMethods

Defined in:
lib/has_logger.rb

Instance Method Summary collapse

Instance Method Details

#loggerObject



25
26
27
28
29
30
31
32
# File 'lib/has_logger.rb', line 25

def logger
  @logger ||= begin 
            logger = Logger.new(@logdev || STDOUT)
            logger.formatter = Logger::Formatter.new
            logger.datetime_format = "%Y-%m-%d %H:%M:%S"
            logger
          end
end