Patch #9102

Dry up MailHandler logging

Added by Alex Shulgin about 6 years ago. Updated about 6 years ago.

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

0%

Category:Code cleanup/refactoring
Target version:-

Description

Attached patch removes duplicated checks on logger presence in the MailHandler. Also, running "if logger && logger.info" 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 logger.info in model mail_handler Closed

History

#1 Updated by Etienne Massip about 6 years ago

  • Category set to Code cleanup/refactoring

#2 Updated by Go MAEDA almost 2 years ago

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

Also available in: Atom PDF