Class: Liri::Common::ColorizeText
- Inherits:
-
Object
- Object
- Liri::Common::ColorizeText
- Defined in:
- lib/common/log.rb
Constant Summary collapse
- COLORS =
{ DEBUG: '0;36', # cyan ERROR: '0;31', # red INFO: '0;32', # green WARN: '0;33', # orange FATAL: '0;35', # pink ANY: '0;36', # cyan DEFAULT: '1;0' # white }
Class Method Summary collapse
- .debug(text) ⇒ Object
- .default(text) ⇒ Object
- .error(text) ⇒ Object
- .fatal(text) ⇒ Object
- .info(text) ⇒ Object
- .unknown(text) ⇒ Object
- .warn(text) ⇒ Object
Class Method Details
.debug(text) ⇒ Object
99 100 101 |
# File 'lib/common/log.rb', line 99 def debug(text) colorize(text, :DEBUG) end |
.default(text) ⇒ Object
95 96 97 |
# File 'lib/common/log.rb', line 95 def default(text) colorize(text, :DEFAULT) end |
.error(text) ⇒ Object
111 112 113 |
# File 'lib/common/log.rb', line 111 def error(text) colorize(text, :ERROR) end |
.fatal(text) ⇒ Object
115 116 117 |
# File 'lib/common/log.rb', line 115 def fatal(text) colorize(text, :FATAL) end |
.info(text) ⇒ Object
103 104 105 |
# File 'lib/common/log.rb', line 103 def info(text) colorize(text, :INFO) end |
.unknown(text) ⇒ Object
119 120 121 |
# File 'lib/common/log.rb', line 119 def unknown(text) colorize(text, :ANY) end |
.warn(text) ⇒ Object
107 108 109 |
# File 'lib/common/log.rb', line 107 def warn(text) colorize(text, :WARN) end |