fluent-format
A command line utility to format fluentd configuration beautifully
Installation
Add this line to your application's Gemfile:
gem 'fluent-format'
And then execute:
$ bundle
Or install it yourself as:
$ gem install fluent-format
Command Line Interface
Format fluent.conf
$ fluent-format -c fluent.conf
Check fluent.conf
$ fluent-format check -c fluent.conf -p plugin_dir
$ echo $? # 0: success 1: failure
As a library
require 'fluent-format'
File.open(path) {|config|
puts Fluent::Format.format(config) # formatted string
puts Fluent::Format.check(config, plugin_dir) #=> true: success false: failure
}
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Licenses
See LICENSE