Module: Formatting::RemoteAddr0

Defined in:
lib/ntail/formatting.rb

Instance Method Summary collapse

Instance Method Details

#value(log_line, color) ⇒ Object



163
164
165
166
167
168
169
170
# File 'lib/ntail/formatting.rb', line 163

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