Class: Log

Inherits:
Object
  • Object
show all
Defined in:
lib/log.rb

Class Method Summary collapse

Class Method Details

.debug(m) ⇒ Object



10
# File 'lib/log.rb', line 10

def debug(m); logger.debug(m); end

.info(m) ⇒ Object



9
# File 'lib/log.rb', line 9

def info(m); logger.info(m); end

.level=(l) ⇒ Object



11
# File 'lib/log.rb', line 11

def level=(l); logger.level = l; end

.loggerObject



3
4
5
6
7
# File 'lib/log.rb', line 3

def logger
  @logger ||= ::Logging.logger(STDOUT)
  @logger.level = ENV.fetch("LOG_LEVEL", "warn").to_sym
  @logger
end

.warn(m) ⇒ Object



8
# File 'lib/log.rb', line 8

def warn(m); logger.warn(m); end