Module: Elmas::Log

Included in:
Elmas
Defined in:
lib/elmas/log.rb

Instance Method Summary collapse

Instance Method Details

#error(msg) ⇒ Object



15
16
17
# File 'lib/elmas/log.rb', line 15

def error(msg)
  logger.error(msg)
end

#info(msg) ⇒ Object



11
12
13
# File 'lib/elmas/log.rb', line 11

def info(msg)
  logger.info(msg)
end

#loggerObject



5
6
7
8
9
# File 'lib/elmas/log.rb', line 5

def logger
  dir = File.dirname("./tmp/errors.log")
  FileUtils.mkdir_p(dir) unless File.directory?(dir)
  Logger.new("./tmp/errors.log", "daily")
end