Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
63 lines (44 sloc) 1.69 KB

Hatchet Hipchat

A HipChat appender for Hatchet.

Build Status

Installation

Add this line to your application's Gemfile:

gem 'hatchet-hipchat'

And then execute:

$ bundle

Or install it yourself as:

$ gem install hatchet-hipchat

Usage

Hatchet.configure do |config|
  config.appenders << Hatchet::HipChatAppender.new do |appender|
    appender.api_token = 'YOUR_HIPCHAT_API_TOKEN'
    appender.room_id   = 'YOUR_ROOM_ID'
    appender.name      = 'MESSAGING_NAME' # Optional - defaults to 'Hatchet'
  end
end

Emoticon formatter

And if you're rage inclined (like me), there's a HipChatEmoticonFormatter you can use to replace levels with rage faces:

Hatchet.configure do |config|
  config.appenders << Hatchet::HipChatAppender.new do |appender|
    appender.formatter = Hatchet::HipChatEmoticonFormatter.new
    # Other configuration
  end
end

Mapping

  • Content :debug
  • Wat :info
  • Oh crap :warn
  • Oh my god :error
  • Boom :fatal

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