class Lumberjack::Formatter::TruncateFormatter

character (U+2026) appended to the end of the string.
When a string is truncated, it will have a unicode ellipsis
only be used when necessary since it is a lossy formatter.
characters that can be logged per message. This formatter should
for formatting messages when there is a limit on the number of
Truncate a string object to a specific length. This is useful

def call(obj)

def call(obj)
  if obj.is_a?(String) && obj.length > @length
    "#{obj[0, @length - 1]}…"
  else
    obj
  end
end

def initialize(length = 32768)

Parameters:
  • length (Integer) -- The maximum length of the string (defaults to 32K)
def initialize(length = 32768)
  @length = length
end