NiboshiJsonFormatter
A Ruby gem that makes your app log in JSON format. It may be useful if you ship all your logs to ElasticSearch.
Installation
Add this line to your application's Gemfile:
gem 'niboshi_json_formatter', github: "ZCloud-Firstserver/niboshi_json_formatter"
And then execute:
$ bundle
Or install it yourself as:
$ gem install niboshi_json_formatter
Usage
Add this to your config/environments/*.rb
files:
config.log_formatter = Niboshi::JsonFormatter.new
Contributing
- Fork it ( https://github.com/[my-github-username]/niboshi_json_formatter/fork )
- 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 a new Pull Request