Project

General

Profile

Actions

Patch #9102

closed

Dry up MailHandler logging

Added by Alex Shulgin over 13 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Code cleanup/refactoring
Target version:
-
Start date:
2011-08-22
Due date:
% Done:

0%

Estimated time:

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.


Files


Related issues

Related to Redmine - Defect #14598: Wrong test with logger.info in model mail_handlerClosed

Actions
Actions

Also available in: Atom PDF