class Splunky::Formatter

Public Class Methods

new() click to toggle source
# File lib/splunky/formatter.rb, line 3
def initialize
  @datetime_format = '%Y-%m-%d %H:%M:%S.%L %z'
end

Public Instance Methods

call(severity, time, progname, msg) click to toggle source
# File lib/splunky/formatter.rb, line 7
def call(severity, time, progname, msg)
  "#{format_datetime(time)} request_id=#{RailsRequestId.get} #{msg.strip}\n"
end