Rails 3 Sending errors to email

前端 未结 4 1323
我在风中等你
我在风中等你 2021-01-13 21:26

How do I hijack Rails (3) error handling to email errors with full trace to me?

4条回答
  •  离开以前
    2021-01-13 22:11

    Haven't done it myself yet, but you should be able to use the log4r gem and substitute that for the stock rails logger. This can be done in environment.rb, see for example this blog post.

    Then you would instruct log4r to send emails on errors, see documentation

提交回复
热议问题