Module: Telemetry::Logger::Color
Instance Method Summary collapse
- #apply(level, message) ⇒ Object
- #data(message) ⇒ Object
- #error(message) ⇒ Object
- #fail(message) ⇒ Object
- #fatal(message) ⇒ Object
- #focus(message) ⇒ Object
- #fubar(message) ⇒ Object
- #info(message) ⇒ Object
- #metadata(text) ⇒ Object
- #obsolete(message) ⇒ Object
- #opt_data(message) ⇒ Object
- #opt_trace(message) ⇒ Object
- #pass(message) ⇒ Object
- #todo(message) ⇒ Object
- #trace(message) ⇒ Object
- #warn(message) ⇒ Object
Instance Method Details
#apply(level, message) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/telemetry/logger/color.rb', line 6 def apply(level, ) if respond_to? level send level, else end end |
#data(message) ⇒ Object
34 35 36 |
# File 'lib/telemetry/logger/color.rb', line 34 def data() Rainbow().cyan end |
#error(message) ⇒ Object
66 67 68 |
# File 'lib/telemetry/logger/color.rb', line 66 def error() Rainbow().red.bg(:black) end |
#fail(message) ⇒ Object
54 55 56 |
# File 'lib/telemetry/logger/color.rb', line 54 def fail() Rainbow().black.bg(:red) end |
#fatal(message) ⇒ Object
70 71 72 |
# File 'lib/telemetry/logger/color.rb', line 70 def fatal() Rainbow().white.bg(:black) end |
#focus(message) ⇒ Object
58 59 60 |
# File 'lib/telemetry/logger/color.rb', line 58 def focus() Rainbow().bright.white.bg(:blue) end |
#fubar(message) ⇒ Object
22 23 24 |
# File 'lib/telemetry/logger/color.rb', line 22 def () Rainbow().red.bg(:yellow) end |
#info(message) ⇒ Object
46 47 48 |
# File 'lib/telemetry/logger/color.rb', line 46 def info() Rainbow().green end |
#metadata(text) ⇒ Object
14 15 16 |
# File 'lib/telemetry/logger/color.rb', line 14 def (text) Rainbow(text).yellow end |
#obsolete(message) ⇒ Object
26 27 28 |
# File 'lib/telemetry/logger/color.rb', line 26 def obsolete() Rainbow().bright.white end |
#opt_data(message) ⇒ Object
30 31 32 |
# File 'lib/telemetry/logger/color.rb', line 30 def opt_data() data() end |
#opt_trace(message) ⇒ Object
38 39 40 |
# File 'lib/telemetry/logger/color.rb', line 38 def opt_trace() trace() end |
#pass(message) ⇒ Object
50 51 52 |
# File 'lib/telemetry/logger/color.rb', line 50 def pass() Rainbow().black.bg(:green) end |
#todo(message) ⇒ Object
18 19 20 |
# File 'lib/telemetry/logger/color.rb', line 18 def todo() Rainbow().bright.white.bg(:white) end |
#trace(message) ⇒ Object
42 43 44 |
# File 'lib/telemetry/logger/color.rb', line 42 def trace() Rainbow().white end |
#warn(message) ⇒ Object
62 63 64 |
# File 'lib/telemetry/logger/color.rb', line 62 def warn() Rainbow().yellow.bg(:black) end |