Formatter
Extended Formatter that supports ANSI colors.
The basic mapping of ANSI colors is as follows:
| reset | bold | dark | underline | blink | negative MOD | 0 | 1 | 2 | 4 | 5 | 7 | black | red | green | yellow | blue | magenta | cyan | white FG | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 BG | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47
The output is done by: ``e[#{mod};#{fg};#{bg}m#{string}e[0m``. The suffix is to reset the terminal to the original state again.
# File lib/innate/log/color_formatter.rb, line 28 28: def call(severity, time, program, message) 29: hint = severity[0,1] 30: time = format_time(time) 31: pid = $$ 32: string = colorize(msg2str(message), severity) 33: 34: FORMAT_LINE % [hint, time, pid, severity, program, string] 35: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.