class Fluent::RamblerOutput
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_rambler.rb, line 35 def initialize super end
Public Instance Methods
configure(conf)
click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_rambler.rb, line 39 def configure(conf) super unless ['gzip', 'txt'].include? @store_as raise ConfigError, "only 'gzip' or 'txt' is allowed for store_as: #{@store_as}" end @separator = '|' @columns = @columns.split(@separator) end
format(tag, time, record)
click to toggle source
Calls superclass method
# File lib/fluent/plugin/out_rambler.rb, line 50 def format(tag, time, record) super @columns.map {|name| if name == '%{time}' # timestamp if @localtime Time.at(time).strftime(@time_format) else Time.at(time).utc.strftime(@time_format) end else # record value record[name].to_s end }.join(@separator) + "\n" end