- _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