Project

General

Profile

Actions

Patch #11497

closed

Dry up logging in MailHandler class

Added by Alex Shulgin almost 12 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Email receiving
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

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".


Files


Related issues

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

Actions
Actions #1

Updated by Go MAEDA about 5 years ago

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

Updated by Go MAEDA about 5 years ago

  • Category set to Email receiving
Actions #3

Updated by Go MAEDA about 5 years ago

  • Status changed from New to Closed

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

Actions

Also available in: Atom PDF