Patch #9102

Dry up MailHandler logging

Added by Alex Shulgin over 9 years ago. Updated over 1 year ago.

Status:ClosedStart date:2011-08-22
Priority:NormalDue date:
Assignee:-% Done:


Category:Code cleanup/refactoring
Target version:-


Attached patch removes duplicated checks on logger presence in the MailHandler. Also, running "if logger &&" seems to be a dumb thing and adds spurious empty log lines.

The fix is to make logger call always return a non-nil object, even when logger is set to nil in the environment configuration file (a default in production.) It might be good to include into Rails itself, so you never need to write another "if logger" line.

0001-Dry-up-MailHandler-logging.patch Magnifier (4.3 KB) Alex Shulgin, 2011-08-22 22:02

Related issues

Related to Redmine - Defect #14598: Wrong test with in model mail_handler Closed


#1 Updated by Etienne Massip over 9 years ago

  • Category set to Code cleanup/refactoring

#2 Updated by Go MAEDA about 5 years ago

  • Related to Defect #14598: Wrong test with in model mail_handler added

#3 Updated by Go MAEDA over 1 year ago

  • Status changed from New to Closed

Fixed in r18069.

Also available in: Atom PDF