https://github.com/work-design/rails_email
Record rails error logs and Email logs, efficient and clean
https://github.com/work-design/rails_email
engine rails ruby
Last synced: about 1 year ago
JSON representation
Record rails error logs and Email logs, efficient and clean
- Host: GitHub
- URL: https://github.com/work-design/rails_email
- Owner: work-design
- Created: 2015-04-24T12:38:48.000Z (about 11 years ago)
- Default Branch: main
- Last Pushed: 2024-11-14T09:41:49.000Z (over 1 year ago)
- Last Synced: 2024-11-14T10:32:43.321Z (over 1 year ago)
- Topics: engine, rails, ruby
- Language: Ruby
- Homepage: https://work.design/rails_log
- Size: 1.31 MB
- Stars: 24
- Watchers: 8
- Forks: 6
- Open Issues: 7
-
Metadata Files:
- Readme: README.en.md
Awesome Lists containing this project
README
# RailsLog
## Features
1. use Notifications and Subscriber, not rescue_from, not Rack middleware, No affect on Performance;
2. 记录了非常详尽的debug信息。
## 使用方法
add to gemfile,默认包含对controller 及 mailer 的日志记录;
`gem 'rails_log'`
如果只需要其中一个,在gemfile中指定 require
`gem 'rails_log', require: 'log_mailer'`
`gem 'rails_log', require: 'log_controller'`
`gem 'rails_log', require: ['log_controller', 'log_mailer']`
nothing any other to do;
### 注意
* 设置发送邮件返回 response
```ruby
config.action_mailer.smtp_settings = {
return_response: true
}
```
* 设置邮件发送不成功raise error,并重发
```ruby
config.action_mailer.raise_delivery_errors = true
```
then you can visit `log_records` to see error records
## 依赖
* [rails_com](https://github.com/qinmingyuan/rails_com) 一个通用的engine
* [default_where](https://github.com/qinmingyuan/default_where) 用于处理查询