Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 8840

Show
Ignore:
Timestamp:
02/10/08 01:11:45 (5 months ago)
Author:
nzkoz
Message:

2-0-stable: Less verbose mail logging: just recipients for :info log level; the whole email for :debug only. References #8000.

Merging [8781]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2-0-stable/actionmailer/CHANGELOG

    r8623 r8840  
    11*SVN* 
     2 
     3* Less verbose mail logging: just recipients for :info log level; the whole email for :debug only.  #8000 [iaddict, Tarmo TÀnav] 
    24 
    35* Updated TMail to version 1.2.1 [raasdnil] 
  • branches/2-0-stable/actionmailer/lib/action_mailer/base.rb

    r8212 r8840  
    464464    def deliver!(mail = @mail) 
    465465      raise "no mail object available for delivery!" unless mail 
    466       logger.info "Sent mail:\n #{mail.encoded}" unless logger.nil? 
     466      unless logger.nil? 
     467        logger.info  "Sent mail to #{recipients.to_a.join(', ')}" 
     468        logger.debug "\n#{mail.encoded}" 
     469      end 
    467470 
    468471      begin 
  • branches/2-0-stable/actionmailer/test/mail_service_test.rb

    r8621 r8840  
    535535    mail = TestMailer.create_signed_up(@recipient) 
    536536    logger = mock() 
    537     logger.expects(:info).with("Sent mail:\n #{mail.encoded}") 
     537    logger.expects(:info).with("Sent mail to #{@recipient}") 
     538    logger.expects(:debug).with("\n#{mail.encoded}") 
    538539    TestMailer.logger = logger 
    539540    TestMailer.deliver_signed_up(@recipient)