Reputation: 1135
I would like to set up the logger option of the Rails Action Mailer, but the only info I found are these lines over at ruby on rails guides Action Mailer Configuration
logger: Generates information on the mailing run if available. Can be set to nil for no logging. Compatible with both Ruby's own Logger and Log4r loggers.
It should be config.action_mailer.logger = :true
, but nothing happens. I also would like to log into a specific file such as for example mailer.log and not into the production.log. Does anyone have more info about how to get this done?
Thanks in advance!
Upvotes: 2
Views: 1887
Reputation: 168
That property accepts an object that meets the standard Ruby Logger interface, such as Logger
. I recommend that you include the log/ folder in the file name, and place the log alongside your other logs.
config.action_mailer.logger = ActiveSupport::Logger.new("log/mailer.log")
Upvotes: 3