class Bauxite::Loggers::XtermLogger
XTerm logger.
This logger outputs colorized lines using xterm (VT100/2) escape sequences.
Protected Instance Methods
_fmt(color, text, size = 0)
click to toggle source
Calls superclass method
Bauxite::Loggers::TerminalLogger#_fmt
# File lib/bauxite/loggers/xterm.rb, line 52 def _fmt(color, text, size = 0) text = super(color, text, size) if @options[:nc] or @options[:color] == 'no' text else "\033[#{COLORS[color]}m#{text}\033[0m" end end
_restore_cursor()
click to toggle source
# File lib/bauxite/loggers/xterm.rb, line 66 def _restore_cursor print "\033[u" true end
_save_cursor()
click to toggle source
# File lib/bauxite/loggers/xterm.rb, line 61 def _save_cursor print "\033[s" true end
_screen_width()
click to toggle source
Calls superclass method
Bauxite::Loggers::TerminalLogger#_screen_width
# File lib/bauxite/loggers/xterm.rb, line 76 def _screen_width if RbConfig::CONFIG['host_os'] =~ /(aix|darwin|linux|(net|free|open)bsd|cygwin|solaris|irix|hpux)/i (_dynamic_width_stty.nonzero? || _dynamic_width_tput) else super end rescue Exception => e super end