Module: Formatting::UpstreamResponseTime0

Defined in:
lib/ntail/formatting.rb

Instance Method Summary collapse

Instance Method Details

#value(log_line, color) ⇒ Object



354
355
356
357
358
359
360
361
# File 'lib/ntail/formatting.rb', line 354

def value(log_line, color)
  if color && Sickill::Rainbow.enabled
    # 15 = 6 + 9, the extra amount of bytes required for the ANSI escape codes...
    "%15s" % foreground(log_line.upstream_response_time, color)
  else
    "%6s" % log_line.upstream_response_time
  end
end