Created
October 30, 2017 01:16
-
-
Save takatoshiono/153118432cb3b9f200f3b31de73fd4c9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fluent/plugin/parser' | |
require 'heroku-log-parser' | |
module Fluent | |
module Plugin | |
class HerokuParser < Parser | |
Fluent::Plugin.register_parser('heroku', self) | |
def configure(conf) | |
super | |
end | |
def parse(data) | |
records = HerokuLogParser.parse(data) | |
yield Time.now.to_i, records | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
これを
lib/fluent/plugin/
においてfluent.confをこんな感じで書けばherokuのLog Drainsから流れてくるログを受け取れる