Exception Notifier - Ruby on Rails plugin

阅读更多
http://sas.sparklingstudios.com/articles/2006/08/31/exception-notifier-ruby-on-rails-plugin

以下是原文:
引用

Yesterday I came over Exception Notifier.

I found it really useful because it is really easy to install and you can instantly react to Application Errors. Your customers don’t have to notify you because you get a bunch of information to track the error via email.

3 easy steps are necessary to set up Exception Notifier:
1. Install the exception_notification plugin:
ruby script/plugin install exception_notification

2. Configure exception_notification: Add following line to your config/environment.rb file:
ExceptionNotifier.exception_recipients = %w([email protected])

3. Tell the Exception Notifier for which controller it shoud send exception notifications to you. In this example it will send notifications for all exceptions:
class ApplicationController < ActionController::Base
    include ExceptionNotifiable 
end

Thats it! Now you will be notified when an error rises.

NOTE: If your server can’t send mails, you have to configure your Rails app for sending mails! See http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailerin section “Configuration”.
For advanced configuration read http://dev.rubyonrails.org/browser/plugins/exception_notification/README

你可能感兴趣的:(Rails,Ruby,UP)