-
Notifications
You must be signed in to change notification settings - Fork 17
README
whoops was originally conceived as an alternative to Hoptoad. Its allows you to:
- Log arbitrary events. Whoops events use an event_type field which can be any string – exception, notification, warning, etc.
- Log arbitrary details. Events are stored in mongodb, giving you the flexibility of a document database.
- Search event details. The search parser maps text to mongoid conditions, allowing you to do queries like “details.current_user_id#in [123, 423]”
- Extend the app. Since it’s a rails engine, you can make changes to your base rails app without worrying about merge difficulties when you upgrade whoops.
If you find yourself bumping up against limitations in Hoptoad, whoops might be right for you.
whoops consists of two main components: the rails 3 engine and the notifier. Hosting is up to you. The engine provides the following:
- Controllers and views for viewing, filtering, and searching events.
- An end point for receiving event notifications
- A mailer for sending email notifications
- Mongoid models
The notifier is documented separately. Briefly, it allows you to create strategies for building an event notification. It also allows you to modify existing strategies.
For example, you could use the rails 3 notifier , but modify it to include the ID of the currently logged in user. If your app ran background processes, you could create a notification strategy specific to your processes. Both strategies can coexist in the same app.
- create a new rails app
- add
gem "whoops"
to your Gemfile - run
bundle
- run
bundle exec rails g whoops:assets
– this copies assets to your public directory (whoops isn’t 3.1 compatible yet) -
optional add
root :to => "event_groups#index"
to your routes file to make the event group listing your home page - add notifiers to the code you want to monitor (documentation forthcoming)
- finish notifications
- site-wide search
- graphing
This project uses MIT-LICENSE.