Module: Alondra::Log

Extended by:
Log
Included in:
Log
Defined in:
lib/alondra/log.rb

Constant Summary collapse

NUMBER_TO_NAME_MAP =
{0=>'DEBUG', 1=>'INFO', 2=>'WARN', 3=>'ERROR', 4=>'FATAL', 5=>'UNKNOWN'}
NUMBER_TO_COLOR_MAP =
{0=>'0;37', 1=>'32', 2=>'33', 3=>'31', 4=>'31', 5=>'37'}

Instance Method Summary collapse

Instance Method Details

#debug(message) ⇒ Object



9
10
11
# File 'lib/alondra/log.rb', line 9

def debug(message)
  add(ActiveSupport::BufferedLogger::Severity::DEBUG, message)
end

#error(message) ⇒ Object



21
22
23
# File 'lib/alondra/log.rb', line 21

def error(message)
  add(ActiveSupport::BufferedLogger::Severity::ERROR, message)
end

#fatal(message) ⇒ Object



25
26
27
# File 'lib/alondra/log.rb', line 25

def fatal(message)
  add(ActiveSupport::BufferedLogger::Severity::FATAL, message)
end

#info(message) ⇒ Object



13
14
15
# File 'lib/alondra/log.rb', line 13

def info(message)
  add(ActiveSupport::BufferedLogger::Severity::INFO, message)
end

#unkwon(message) ⇒ Object



29
30
31
# File 'lib/alondra/log.rb', line 29

def unkwon(message)
  add(ActiveSupport::BufferedLogger::Severity::UNKNOWN, message)
end

#warn(message) ⇒ Object



17
18
19
# File 'lib/alondra/log.rb', line 17

def warn(message)
  add(ActiveSupport::BufferedLogger::Severity::WARN, message)
end