No commit activity in last 3 years
No release in over 3 years
Fluentd formatter plugin for formatting record to pretty json.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

Runtime

>= 0.14.0
 Project Readme

fluent-plugin-formatter_pretty_json

Build Status

Fluentd formatter plugin for formatting record to pretty json.

Requirements

fluent-plugin-formatter_pretty_json fluentd ruby
>= 1.0.0 >= v0.14.0 >= 2.1
< 1.0.0 >= v0.12.0 >= 1.9

Installation

Install by gem:

$ gem install fluent-plugin-formatter_pretty_json

Or if you use td-agent:

$ flunet-gem install fluent-plugin-formatter_pretty_json

Usage

You simply specify pretty_json at format config param in formatter available plugins.

Like below:

<match test.**>
  type   file
  path   /path/to/file
  format pretty_json
</match>

Output is like below:

{
  "foo": "bar",
  "test": "hoge"
}
{
  "foo": "bar",
  "test": "hoge"
}

Also you can use include_time_key, time_key, time_format, include_tag_key, tag_key, localtime, timezone parameters.

If you use these parameters, you see http://docs.fluentd.org/articles/out_file#format .

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request