Page MenuHomePhabricator

Cleanup _logging.Formatter
Closed, ResolvedPublic

Description

  • _logging.RotatingFileHandler provides its own format method and overrides the default behaviour which just calls its formatter format method. move RotatingFileHandler.format method to the LoggingFormatter.
  • Formatter.formatException adds a newline already. It is not necessary to do it inside a derived class.

See: https://github.com/python/cpython/blob/3.9/Lib/logging/__init__.py for both issues

Event Timeline

Xqt triaged this task as Low priority.
Xqt updated the task description. (Show Details)

Change 703500 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [IMPR] Update _logging.Formatter

https://gerrit.wikimedia.org/r/703500

Change 703500 merged by jenkins-bot:

[pywikibot/core@master] [IMPR] Cleanup _logging.Formatter

https://gerrit.wikimedia.org/r/703500