Patch #9102

Dry up MailHandler logging

Added by Alex Shulgin almost 8 years ago. Updated almost 8 years ago.

Status:NewStart 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 almost 8 years ago

  • Category set to Code cleanup/refactoring

#2 Updated by Go MAEDA over 3 years ago

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

Also available in: Atom PDF