From fbd3eb7142e2ac51b230ab2fff83feb800e1b50c Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 2 Feb 2008 05:32:15 +0000 Subject: Less verbose mail logging: just recipients for :info log level; the whole email for :debug only. Closes #8000. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8781 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionmailer/lib/action_mailer/base.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'actionmailer/lib') diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 2da3679206..ab3ca7f1be 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -468,7 +468,10 @@ module ActionMailer #:nodoc: # no alternate has been given as the parameter, this will fail. def deliver!(mail = @mail) raise "no mail object available for delivery!" unless mail - logger.info "Sent mail:\n #{mail.encoded}" unless logger.nil? + unless logger.nil? + logger.info "Sent mail to #{recipients.to_a.join(', ')}" + logger.debug "\n#{mail.encoded}" + end begin __send__("perform_delivery_#{delivery_method}", mail) if perform_deliveries -- cgit v1.2.3