Class: Logger
- Inherits:
-
Object
- Object
- Logger
- Defined in:
- lib/logger/colors.rb,
lib/logger/colors.rb
Defined Under Namespace
Modules: Colors
Instance Method Summary collapse
Instance Method Details
#format_message(level, *args) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/logger/colors.rb', line 41 def (level, *args) if Logger::Colors::SCHEMA[@logdev.dev] color = begin Logger::Colors.const_get \ Logger::Colors::SCHEMA[@logdev.dev][Logger.const_get(level.sub "ANY","UNKNOWN")].to_s.upcase rescue NameError "0;0" end "\e[#{ color }m#{ (level, *args) }\e[0;0m" else (level, *args) end end |
#format_message_colorless ⇒ Object
39 |
# File 'lib/logger/colors.rb', line 39 alias |