class Fluent::SupershipDssApplogOutput

Public Instance Methods

configure(conf) click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_supership-dss-applog.rb, line 16
def configure(conf)
  super
end
emit(tag, es, chain) click to toggle source
# File lib/fluent/plugin/out_supership-dss-applog.rb, line 20
def emit(tag, es, chain)
  chain.next
  es.each {|time, record|
    record['time'] = Time.parse(record['ts']).gmtime.iso8601(3) if @add_time
    new_record = "#{@prefix_name}.#{@service_name}.#{@log_type}\t#{timestamp(time, record)}\t#{record.to_json}\n"
    router.emit(@new_tag, time, new_record)
  }
end
timestamp(time, record) click to toggle source
# File lib/fluent/plugin/out_supership-dss-applog.rb, line 29
def timestamp(time, record)
  @timestamp_key.nil? ? time : record[@timestamp_key]
end