Patch #11497

Dry up logging in MailHandler class

Added by Alex Shulgin about 8 years ago. Updated over 1 year ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Email receiving
Target version:-

Description

The current approach to logging in MailHandler is a bit funny. Instead of checking "if logger" every time, just make sure logger returns non-nil.

Also, extra-checking with "if logger && logger.info" doesn't make much sense. It prints extra blank lines when logger is set and accepts info level, but has no point when level setting is different. It's perfectly safe to just call "logger.info message".

0012-Dry-up-MailHandler-logging.patch Magnifier (5.55 KB) Alex Shulgin, 2012-07-24 14:22


Related issues

Related to Redmine - Defect #30457: MailHandler.safe_receive does not output any error log Closed

History

#1 Updated by Go MAEDA over 1 year ago

  • Related to Defect #30457: MailHandler.safe_receive does not output any error log added

#2 Updated by Go MAEDA over 1 year ago

  • Category set to Email receiving

#3 Updated by Go MAEDA over 1 year ago

  • Status changed from New to Closed

"logger.info(...) if logger" was replaced with "logger&.info(...)" in r18069 as a part of #30457.

Also available in: Atom PDF