Merge pull request #60 from google/gbg/fix-console-logs

use a formatter object, not a string
This commit is contained in:
Gilles Boccon-Gibod
2022-11-09 13:19:26 -08:00
committed by GitHub

View File

@@ -902,7 +902,7 @@ class LogHandler(logging.Handler):
def __init__(self, app):
super().__init__()
self.app = app
self.setFormatter("[%(asctime)s][%(pathname)s:%(lineno)d][%(levelname)s] %(message)s")
self.setFormatter(logging.Formatter('[%(asctime)s][%(levelname)s] %(message)s'))
def emit(self, record):
message = self.format(record)