{"action":"created","issue":{"url":"https://api.github.com/repos/fluent/fluentd/issues/1165","repository_url":"https://api.github.com/repos/fluent/fluentd","labels_url":"https://api.github.com/repos/fluent/fluentd/issues/1165/labels{/name}","comments_url":"https://api.github.com/repos/fluent/fluentd/issues/1165/comments","events_url":"https://api.github.com/repos/fluent/fluentd/issues/1165/events","html_url":"https://github.com/fluent/fluentd/pull/1165","id":171564652,"number":1165,"title":"Create tool that load dumped event","user":{"login":"ganmacs","id":5616899,"avatar_url":"https://avatars.githubusercontent.com/u/5616899?v=3","gravatar_id":"","url":"https://api.github.com/users/ganmacs","html_url":"https://github.com/ganmacs","followers_url":"https://api.github.com/users/ganmacs/followers","following_url":"https://api.github.com/users/ganmacs/following{/other_user}","gists_url":"https://api.github.com/users/ganmacs/gists{/gist_id}","starred_url":"https://api.github.com/users/ganmacs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ganmacs/subscriptions","organizations_url":"https://api.github.com/users/ganmacs/orgs","repos_url":"https://api.github.com/users/ganmacs/repos","events_url":"https://api.github.com/users/ganmacs/events{/privacy}","received_events_url":"https://api.github.com/users/ganmacs/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/fluent/fluentd/labels/v0.14","name":"v0.14","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"tagomoris","id":230654,"avatar_url":"https://avatars.githubusercontent.com/u/230654?v=3","gravatar_id":"","url":"https://api.github.com/users/tagomoris","html_url":"https://github.com/tagomoris","followers_url":"https://api.github.com/users/tagomoris/followers","following_url":"https://api.github.com/users/tagomoris/following{/other_user}","gists_url":"https://api.github.com/users/tagomoris/gists{/gist_id}","starred_url":"https://api.github.com/users/tagomoris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tagomoris/subscriptions","organizations_url":"https://api.github.com/users/tagomoris/orgs","repos_url":"https://api.github.com/users/tagomoris/repos","events_url":"https://api.github.com/users/tagomoris/events{/privacy}","received_events_url":"https://api.github.com/users/tagomoris/received_events","type":"User","site_admin":false},"assignees":[{"login":"tagomoris","id":230654,"avatar_url":"https://avatars.githubusercontent.com/u/230654?v=3","gravatar_id":"","url":"https://api.github.com/users/tagomoris","html_url":"https://github.com/tagomoris","followers_url":"https://api.github.com/users/tagomoris/followers","following_url":"https://api.github.com/users/tagomoris/following{/other_user}","gists_url":"https://api.github.com/users/tagomoris/gists{/gist_id}","starred_url":"https://api.github.com/users/tagomoris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tagomoris/subscriptions","organizations_url":"https://api.github.com/users/tagomoris/orgs","repos_url":"https://api.github.com/users/tagomoris/repos","events_url":"https://api.github.com/users/tagomoris/events{/privacy}","received_events_url":"https://api.github.com/users/tagomoris/received_events","type":"User","site_admin":false}],"milestone":null,"comments":13,"created_at":"2016-08-17T03:10:24Z","updated_at":"2016-09-02T06:27:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/fluent/fluentd/pulls/1165","html_url":"https://github.com/fluent/fluentd/pull/1165","diff_url":"https://github.com/fluent/fluentd/pull/1165.diff","patch_url":"https://github.com/fluent/fluentd/pull/1165.patch"},"body":"`fluent-binlog-reader` is a command line tool to read the data which is saved as `Message Pack` format.\r\n\r\n## Usage of `fluent-binlog-reader`'s Commands\r\n\r\n### `head`\r\n\r\n`head` is used to display the beginning of a text file.\r\n\r\n```\r\n$ fluent-binlog-reader head packed.log\r\n2016-08-12T17:24:18+09:00       packed.log      {\"message\":\"dummy\"}\r\n2016-08-12T17:24:18+09:00       packed.log      {\"message\":\"dummy\"}\r\n2016-08-12T17:24:18+09:00       packed.log      {\"message\":\"dummy\"}\r\n2016-08-12T17:24:18+09:00       packed.log      {\"message\":\"dummy\"}\r\n2016-08-12T17:24:18+09:00       packed.log      {\"message\":\"dummy\"}\r\n```\r\n\r\nYou can specify the number of events to display.\r\n\r\n```\r\n$ fluent-binlog-reader head -n 1 packed.log\r\n2016-08-12T17:24:18+09:00       packed.log      {\"message\":\"dummy\"}\r\n```\r\n\r\n\r\n### `cat`\r\n\r\n`cat` reads files sequentially, writing them to standard output.\r\n\r\n\r\n```\r\n$ fluent-binlog-reader cat packed.log\r\n2016-08-12T17:24:18+09:00       packed.log      {\"message\":\"dummy\"}\r\n\r\n...\r\n\r\n2016-08-12T17:24:18+09:00       packed.log      {\"message\":\"dummy\"}\r\n```\r\n\r\n\r\n### `formats`\r\n\r\n`formats` displays plugins that you can use.\r\n\r\n```\r\n$ fluent-binlog-reader formats\r\nout_file\r\nstdout\r\njson\r\nhash\r\nmsgpack\r\nltsv\r\ncsv\r\nsingle_value\r\n```\r\n\r\n## Global Options\r\n\r\n### `--format`\r\n\r\nYou can specify the `formatter` as shown below.\r\n\r\n```\r\n$ fluent-binlog-reader cat packed.log --format=json\r\n{\"message\":\"dummy\"}\r\n...\r\n{\"message\":\"dummy\"}\r\n```\r\n\r\n## Format params\r\n\r\n`formatter` has configurable params.(e.g. `CsvFormatter` has `delimiter`, `force_quotes`, and `fields`)\r\nYou can pass these params by using `-e` option.\r\n\r\n```\r\n$ fluent-binlog-reader cat --formats=csv  -e fields=message packed.log\r\n\"dummy\"\r\n...\r\n\"dummy\"\r\n```\r\n\r\n### `--plugin`\r\n\r\nYou can add new plugins path.\r\n\r\n\r\n```\r\n# $ touch my_plugins/fomatter_csv2.rb\r\n# $ vi my_plugins/fomatter_csv2.rb\r\n\r\n$ fluent-binlog-reader cat formats=csv2 --plugin=my_plugins\r\n...\r\n```\r\n\r\n\r\n## TODO\r\n\r\n- [x] Subcommands\r\n  - [x] `head`\r\n  - [x] `cat`\r\n  - [x] `formats`\r\n- [x] adding plugins path\r\n- [x] specifed format\r\n- [x] specifed format params\r\n- [x] add tests\r\n"},"comment":{"url":"https://api.github.com/repos/fluent/fluentd/issues/comments/244293733","html_url":"https://github.com/fluent/fluentd/pull/1165#issuecomment-244293733","issue_url":"https://api.github.com/repos/fluent/fluentd/issues/1165","id":244293733,"user":{"login":"repeatedly","id":16928,"avatar_url":"https://avatars.githubusercontent.com/u/16928?v=3","gravatar_id":"","url":"https://api.github.com/users/repeatedly","html_url":"https://github.com/repeatedly","followers_url":"https://api.github.com/users/repeatedly/followers","following_url":"https://api.github.com/users/repeatedly/following{/other_user}","gists_url":"https://api.github.com/users/repeatedly/gists{/gist_id}","starred_url":"https://api.github.com/users/repeatedly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/repeatedly/subscriptions","organizations_url":"https://api.github.com/users/repeatedly/orgs","repos_url":"https://api.github.com/users/repeatedly/repos","events_url":"https://api.github.com/users/repeatedly/events{/privacy}","received_events_url":"https://api.github.com/users/repeatedly/received_events","type":"User","site_admin":false},"created_at":"2016-09-02T06:27:22Z","updated_at":"2016-09-02T06:27:22Z","body":"Two directories for test formatter plugins are needed?\r\n`test/scripts/fluent/plugin/formatter/{formatter_test1,formatter_test2}.rb` seems enough."}}
{"actor":{"display_login":"repeatedly"}}