Justlogging

This plugin enables easy logging from any Ruby application to our webservice.

For other languages checkout:

  • http://www.github.com/justlogging/php_logger
  • http://www.github.com/justlogging/python_logger
  • http://www.github.com/justlogging/perl_logger

Install

Install it as a gem (on gemcutter): gem install justlogging

For rails:

Add this to your enviroment.rb config.gem "justlogging", :lib => 'justlogging'

and run


  rake gems:install
  script/generate justlogging

The generator copies a file called justlogging.rb to the RAILS_ROOT/config/initializer directory. You need to set you api key there and optionally your default log key.

Usage

Configuration (only needed if not used as rails gem)


Justlogging.configure do |config|
  config.api_key = 'api_key'
  config.log_key = 'log_name'
end

Normal log entry: Justlogging.log('this is my first entry')

Alert Justlogging.alert('this is my first alert')

Optional parameter for alert and log is the log you want to post to like: Justlogging.log('another log entry', 'messages')

Easy as pie.

Copyright © 2009 Justlogging, released under the MIT license