Skip to content

Instantly share code, notes, and snippets.

@glidenote
Created July 14, 2012 20:52
Show Gist options
  • Save glidenote/3113323 to your computer and use it in GitHub Desktop.
Save glidenote/3113323 to your computer and use it in GitHub Desktop.
fluent_format_debug.rb
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'time'
require 'fluent/log'
require 'fluent/config'
require 'fluent/engine'
require 'fluent/parser'
$log ||= Fluent::Log.new
# debug
log = ''
format = //
time_format = ''
parser = Fluent::TextParser::RegexpParser.new(format, 'time_format' => time_format)
puts parser.call(log)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment