rails开发利器:时刻监控我们的程序错误rails exception_notification
2011-11-20 14:38
429 查看
介绍
exception_notification
rails 2.3.8 https://github.com/smartinez87/exception_notification/tree/2-3-stable
rails 3 https://github.com/rails/exception_notification
install plugin
ruby script/plugin install git://github.com/rails/exception_notification.git -r '2-3-stable'
configuration
将如下代码加入到environment.rb的最后
如何想能development环境下测试,需要增加如下代码至application_controller.rb
rails2如何配置发送邮件?
资料
https://github.com/rails/exception_notification/tree/2-3-stable
rails3中的配置
新增gem
config/application.rb文件
更多具体的使用
https://github.com/smartinez87/exception_notification http://www.taobaotest.com/blogs/qa?bid=13030 http://stackoverflow.com/questions/3524127/exception-notification-gem-and-rails-3 http://www.stormconsultancy.co.uk/blog/development/basic-exception-notification-in-rails-3/
exception_notification
rails 2.3.8 https://github.com/smartinez87/exception_notification/tree/2-3-stable
rails 3 https://github.com/rails/exception_notification
install plugin
ruby script/plugin install git://github.com/rails/exception_notification.git -r '2-3-stable'
configuration
将如下代码加入到environment.rb的最后
ExceptionNotification::Notifier.exception_recipients = %w(hexudong08@gmail.com) #接受错误的邮件 ExceptionNotification::Notifier.sender_address = %("Application Error" <yunshiteam@rayclear.com>) #发送错误的邮件 |ExceptionNotification::Notifier.email_prefix = "[APP]" #定义发送错误的级别,默认是ERROR2.3 update application_controller.rb
include ExceptionNotification::Notifiable
如何想能development环境下测试,需要增加如下代码至application_controller.rb
def local_request? false end并修改config/environments/development.rb
config.action_controller.consider_all_requests_local = false config.action_mailer.raise_delivery_errors = true
rails2如何配置发送邮件?
资料
https://github.com/rails/exception_notification/tree/2-3-stable
rails3中的配置
新增gem
gem 'exception_notification', :require => 'exception_notifier'
config/application.rb文件
config.middleware.use ExceptionNotifier, :email_prefix => "[APP] ", :sender_address => %{"异常通知" <xxxxx@xxxxxx.com>}, :exception_recipients => %w{xxxxx@163.com}
更多具体的使用
https://github.com/smartinez87/exception_notification http://www.taobaotest.com/blogs/qa?bid=13030 http://stackoverflow.com/questions/3524127/exception-notification-gem-and-rails-3 http://www.stormconsultancy.co.uk/blog/development/basic-exception-notification-in-rails-3/
相关文章推荐
- rails开发利器:如何给苹果PushServer发送消息rails for apple_push_notification
- 通达OA 开发监控工作流超时自动转交的程序(图文)
- 进程监控程序的开发(程序运行监控)
- [Ruby on Rails系列]3、初试Rails:使用Rails开发第一个Web程序
- 用java开发跨平台简易服务器站点监控程序
- 安卓应用开发实战:[2]修改程序名称&标题我们首先看一下程序没修改之前的应用名称和标题的显示效果,可见默认是用工程名字来命名的。
- 利用Radrails开发Ruby on Rails程序入门指南
- 使用GO语言开发 Redis数据监控程序
- Web开发利器:Ruby on Rails
- 【Android开发经验】我们要友好的告诉用户,程序要崩溃了
- rails开发利器-如何为表增加索引add_index for tables
- 走进开发,5分钟知悉微信小程序“召回利器”
- 让你提前认识软件开发(15):程序调试的利器—日志
- [Web开发] Web程序调式的利器 - Fiddler (HTTP协议监视工具)
- Linux内核监控模块-1-驱动模块(LKM)开发(以一个简单的hello world程序为例)
- 从根本上改变我们开发Java程序的方式:Lambda
- 如何正确使用javascript 来进行我们的程序开发
- 如何正确使用javascript 来进行我们的程序开发
- [Web开发] Web程序调式的利器 - Fiddler (HTTP协议监视工具)