Alephant::Logger

Logger functionality for BBC News' Alephant framework.

Build
Status Gem Version

Installation

Add this line to your application's Gemfile:

gem 'alephant-logger'

And then execute:

$ bundle

Or install it yourself as:

$ gem install alephant-logger

In addition to this, you may want to install one of the supported Alephant logger drivers:

Usage

require "alephant/logger"
require "alephant/logger/statsd"
require "alephant/logger/cloudwatch"

config = {
  :host      => "statsd.test.service.bbc.co.uk",
  :port      => 6452,
  :namespace => "test"
}

statsd_driver     = Alephant::Logger::Statsd.new config
cloudwatch_driver = Alephant::Logger::CloudWatch.new "my_namespace"

logger = Alephant::Logger.setup([statsd_driver, cloudwatch_driver])
logger.increment "foo.bar"
logger.metric(:name => "FooBar", :unit => "Count", :value => 1)

Note: Alephant::Logger.setup is mandatory
Arguments are optional though

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 new Pull Request.