Flnt
Gentle post-to-fluentd log solution.
Powered by wercker
Installation
Usual Gemfile way:
gem 'flnt'
$ bundle install
Usage
Just post log to fluent
- Setting up fluentd on your localhost:24224
- Call the methods below:
Flnt.app.payment.info "Payment done"
- Then, your fluentd receives json
{message: "Payment done"}
with tagapp.payment.info
Flnt
compiles method chaining into a tag, and when the method is called with an argument,
it emits the information to fluentd.
NOTE: You cannot use methods such as foo?
or foo!
for tag suffix. only /[a-zA-Z0-9_]/
are OK.
Configuration of fluentd
Flnt::Configuration.configure do |c|
c.prefix = "foobar"
c.host = 'fluentd.example.jp'
c.port = 12345
end
License
see LICENSE.txt
.
Contributing
The usual github way.
- 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