Class: UU::LoggerStderr::FormatterColor

Inherits:
Formatter
  • Object
show all
Defined in:
lib/uu/logger_stderr.rb

Constant Summary collapse

DECORATION =
{
  'UNKNOWN' => { color: :red, mode: :underline },
  'FATAL' => { color: :red, mode: :underline },
  'ERROR' => :red,
  'WARN' => :yellow,
  'INFO' => :default,
  'DEBUG' => :light_black,
}.freeze

Constants inherited from Formatter

UU::LoggerStderr::Formatter::PATHS

Instance Attribute Summary

Attributes inherited from Formatter

#context

Instance Method Summary collapse

Methods inherited from Formatter

#find_location, #initialize, #meaningful_location

Constructor Details

This class inherits a constructor from UU::LoggerStderr::Formatter

Instance Method Details

#call(severity, time, _progname, msg) ⇒ Object



63
64
65
# File 'lib/uu/logger_stderr.rb', line 63

def call(severity, time, _progname, msg)
  super.colorize(DECORATION[severity])
end