Sha256: b8fd9a35560d682d2d781502f8208dbaef0cc7be33b1bc3463ef8033f2f8bd99

Contents?: true

Size: 506 Bytes

Versions: 303

Compression:

Stored size: 506 Bytes

Contents

require 'json'
require 'msgpack'

def gen_tsv(time)
  "#{time}\ttag1\tok"
end

def gen_json(time)
  {'tag' => 'tag1', 'time' => time, 'k1' => 'ok'}.to_json
end

def gen_msgpack(time)
  {'tagger' => 'tag1', 'datetime' => time, 'k1' => 'ok'}.to_msgpack
end

def gen_raw_string(time)
  "#{time} hello"
end

time = ARGV.first
time = Integer(time) rescue time

case ARGV.last.to_i
when 0
  puts gen_tsv(time)
when 1
  puts gen_json(time)
when 2
  print gen_msgpack(time)
when 3
  print gen_raw_string(time)
end

Version data entries

303 entries across 303 versions & 8 rubygems

Version Path
fluentd-0.14.6 test/scripts/exec_script.rb
fluentd-0.12.29 test/scripts/exec_script.rb
fluentd-0.14.5-x64-mingw32 test/scripts/exec_script.rb
fluentd-0.14.5-x86-mingw32 test/scripts/exec_script.rb
fluentd-0.14.5 test/scripts/exec_script.rb
fluentd-0.14.4-x64-mingw32 test/scripts/exec_script.rb
fluentd-0.14.4-x86-mingw32 test/scripts/exec_script.rb
fluentd-0.14.4 test/scripts/exec_script.rb
fluentd-0.14.3 test/scripts/exec_script.rb
fluentd-0.12.28 test/scripts/exec_script.rb
fluentd-0.14.2 test/scripts/exec_script.rb
fluentd-0.12.27 test/scripts/exec_script.rb
fluentd-0.14.1 test/scripts/exec_script.rb
fluentd-0.14.0 test/scripts/exec_script.rb
fluentd-0.12.26 test/scripts/exec_script.rb
fluentd-0.12.25 test/scripts/exec_script.rb
fluentd-0.12.24 test/scripts/exec_script.rb
fluentd-0.12.23 test/scripts/exec_script.rb
fluentd-0.12.22 test/scripts/exec_script.rb
fluentd-0.12.21 test/scripts/exec_script.rb