ruby : Exception Notification

 

 https://github.com/smartinez87/exception_notification#sections

 

Add the following line to your application's Gemfile:

gem 'exception_notification'

 

As of Rails 3 ExceptionNotification is used as a rack middleware, or in the environment you want it to run. In most cases you would want ExceptionNotification to run on production. Thus, you can make it work by putting the following lines in your 

config/environments/production.rb:

 

 

Whatever::Application.config.middleware.use ExceptionNotification::Rack,
  :email => {
    :email_prefix => "[Whatever] ",
    :sender_address => %{"notifier" <notifier@example.com>},
    :exception_recipients => %w{exceptions@example.com}
  }

 

-------------------------------

 30 
 31 Cms::Application.config.middleware.use ExceptionNotifier,
 32   :email_prefix => "[CMS Error] ",
 33   :sender_address => %{#{Settings.notifier.full_email}},
 34   :exception_recipients => %w{aaa@w.com  aaa@w.com}

 

posted @ 2014-05-28 10:48  冰凌花花~  阅读(405)  评论(0编辑  收藏  举报