Gem for integration with logbook.me
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
tmp
.gitignore
.rvmrc
Gemfile
Gemfile.lock
README.rdoc
Rakefile
logbook.gemspec

README.rdoc

What's logbook?

Logbook is a hosted service for collecting log entries from your application.

Requirements

Works in Rails 3 only at the moment. Check back later for more framework / versions.

Getting started

  • Go to logbook.me and create an account

  • Download logbook.yml that it genereated for you to the config dir

  • Add this gem to your Gemfile:

    gem 'logbook'

Usage

Anywhere in your application:

Logbook.debug 'facility', { :my => 'data' }

Logbook has a method for every severity supported by the standard Ruby logger (in order of priority: debug < info < warn < error < fatal < unknown). Thefirst parameter it takes specifies “facility”. It's a linux syslog analogy and allows to have different “types” of log entries so that you could filter them in the web interface more easily later. The second parameter needs to be a hash with any data that you want to log. Passing a hash is good because it allows to log structured data, which again makes it possible to filter records in the web interface.

Troubleshooting

Check the log/logbook.log in your app's directory. Use the “feedback” button on our site logbook.me to contact us if you're having problems. Or submit an issue on github.

Authors

We created this service and gem during Rails Rumble 2010: railsrumble.com/teams/48-hours-of-unpaid-work-and-5-cookies