parser.rb
require 'fluent/log'
require 'fluent/config'
require 'fluent/parser'
require 'fluent/engine'
require 'time'
log = ''
format = //
time_format = ''
parser = Fluent::TextParser::RegexpParser.new(format, :time_format => time_format)
puts parser.call(log)
logにnginxやapacheのログを1行はる
formatにfluentdのconfファイルのformatをそのままはる
time_formatは良しなに。
テンションあがれば、もうちょっと詳しく書く。