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}
ruby : Exception Notification的更多相关文章
- Debugger Exception Notification
--------------------------- Debugger Exception Notification --------------------------- Project PJSP ...
- Ruby Exception
begin #可能发生异常的地方 rescue #如何处理异常 end rescue,哈哈,太有爱的一个单词了... begin #可能发生异常的地方 rescue => exception # ...
- Android消息通知(notification)和PendingIntent传值
通知栏的自定义布局:转:http://blog.csdn.net/vipzjyno1/article/details/25248021 拓展 实现自定义的通知栏效果: 这里要用到RemoteViews ...
- 《ruby编程语言》笔记2 对象
ruby是一门非常纯粹的面向对象的语言:所有值都是对象,而且没有基本类型(primitive type)和对象类型的区别,这一点不同于其他语言.在Ruby中,所有对象都继承一个Object类,而且共享 ...
- 【原创】大数据基础之Logstash(3)应用之file解析(grok/ruby/kv)
从nginx日志中进行url解析 /v1/test?param2=v2¶m3=v3&time=2019-03-18%2017%3A34%3A14->{'param1':' ...
- win2008使用FireDac连接ORACLE数据库问题
2008上装DELPHI XE7,无论用FireDac 还是Ado都连不上ORACLE数据库 --------------------------- Debugger Exception Notifi ...
- BizTalk开发系列(十) ESB Guidance安装笔记
ESB指导工具包(ESB Guidance)是一个运行于BizTalk Server 2006 R2之上的一个框架.详细信息访问ESB指导工具包社区网站 .源码下载 ESB Guidance的安装过程 ...
- Delphi EVariantTypeCastError错误的解决方法
在执行程序的时候总是提示: ---------------------------Debugger Exception Notification---------------------------P ...
- 编写跨平台代码之memory alignment
编写网络包(存储在堆上)转换程序时,在hp-ux机器上运行时会遇到 si_code: 1 - BUS_ADRALN - Invalid address alignment. Please refer ...
随机推荐
- Sql Server 附加没有日志文件的数据库(.mdf)文件方法
附加数据库,附加的时候会提醒找不到log文件 针对以上现象有两个写法的语句能解决: 写法一: USE MASTER; EXEC sp_detach_db @dbname = 'TestDB'; EXE ...
- [设计模式] javascript 之 建造者模式
建造者模式说明 1. 将一个复杂对象的 构造 与它的表示相分离,使同样的创建过程可有不同的表示,这就叫做建造者模式. 2. 面向对象语言中的说明,主要角色: 1>. Builder 这个接口类, ...
- angular_$inject
<!DOCTYPE HTML> <html lang="zh-cn" ng-app="MainApp"> <head> &l ...
- 自定义的 ListBoxItem 自适应ListBox的宽度
主要是要设置HorizontalContentAlignment的值,而不是HorizontalAlignment <ListBox x:Name="xxx"> < ...
- JDO持久 (jdbc ejb)
转自:http://blog.csdn.net/liuzhigang1237/article/details/6305113 JDO快速入门 Java数据对象(Java Data Objects,JD ...
- java ee 中文乱码的问题
java ee 中文乱码的问题 发生中文乱码的三种情况 (一) 表单form Post 方法 直接在服务器中设置 request.setCharacterEncoding("utf-8&qu ...
- [转]DIV+CSS和TABLE的区别
现在全国大大小小的网站都在搞一场技术“革命”,就是所谓“网站重构”说简单点就是DIV+CSS进行网站制作.用DIV+CSS代替传统的Table制作框架和美化页面.百度搜索优化 在重构之前,肯定要了解为 ...
- iOS开发小技巧--利用运行时得到隐藏的成员变量
一.关于运行时,已经从网络上摘抄了一片文章,这里只有项目中自己的简单使用 -- 查找隐藏的成员变量 导入头文件 可以获得隐藏的成员变量,方法,属性等 代码: 打印效果图:
- Shell重定向&>file、2>&1、1>&2的区别
shell上: 0表示标准输入 1表示标准输出 2表示标准错误输出 > 默认为标准输出重定向,与 1> 相同 2>&1 意思是把 标准错误输出 重定向到 标准输出. & ...
- 未能加载文件或程序集“EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”
未能加载文件或程序集“EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089” 使用nu ...