Module: Logger
- Defined in:
- lib/logger.rb
Overview
The logger is using colorizing-functionality from Thor’s shell
Defined Under Namespace
Classes: LogLevel
Constant Summary collapse
- LEVEL =
{ :debug => LogLevel.new(0, "DEBUG ", :white), :info => LogLevel.new(1, "INFO ", :blue), :warn => LogLevel.new(2, "WARN ", :yellow), :error => LogLevel.new(3, "ERROR ", :red), :system => LogLevel.new(10, "", :black) }
Class Method Summary collapse
Class Method Details
.method_missing(name, *args) ⇒ Object
26 27 28 29 30 31 |
# File 'lib/logger.rb', line 26 def self.method_missing(name, *args) level = LEVEL[name.to_sym] raise NoMethodError.new(name.to_s) if level.nil? log(level, args) end |