简体   繁体   English

发展中的延迟工作

[英]Delayed_job in development

Right now my Usermailer is written so I have UserMailer.delay.deliver_blah. 现在我的Usermailer已写好,所以我有UserMailer.delay.deliver_blah。 Everything works perfect, but like before I'd like the contents of the email printed out in the console for debugging. 一切正常,但就像之前我希望在控制台中打印出电子邮件内容进行调试之前一样。 HOw do I do this? 我该怎么做呢?

Set the ActionMailer logger and set the correct log level, during mailer initialization. 在邮件初始化期间,设置ActionMailer记录器并设置正确的日志级别。

ActionMailer::Base.logger = Logger.new(STDOUT)
ActionMailer::Base.logger.level = :info

OR 要么

ActionMailer::Base.logger = Rails.logger
ActionMailer::Base.logger.level = :info

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM