use a formatter object, not a string

This commit is contained in:
Gilles Boccon-Gibod
2022-11-08 13:19:41 -08:00
parent cea1905ffb
commit 6e1baf0344
+1 -1
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)