FlumeLogger
This gem implements a subclass of Ruby's Logger class that logs directly to flume. It writes to a flume agent using thrift RPC, support both FlumeNG (default) or FlumeOG (ThriftLegacy).
Installation
Add this line to your application's Gemfile:
gem 'flume-logger'
And then execute:
$ bundle
Or install it yourself as:
$ gem install flume-logger
Usage
require 'flume-logger'
logger = FlumeLogger.new('localhost', 9090)
logger.progname = 'test-flume-ng'
logger.info "Hello INFO from ruby"
logger.warn "Hello WARN from ruby"
logger.error "Hello ERROR from ruby"
og_logger = FlumeLogger.new('localhost', 9090, :og)
og_logger.progname = 'test-flume-og'
og_logger.info "Hello from ruby"
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