We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f3e473 commit 08e10c5Copy full SHA for 08e10c5
interactions/base.py
@@ -67,6 +67,11 @@ def __init__(self):
67
init(autoreset=True)
68
69
def format(self, record):
70
- log_format = self.formats.get(record.levelno)
71
- formatter = logging.Formatter(log_format)
72
- return formatter.format(record)
+ # reference
+ # https://github.com/python/cpython/blob/3.10/Lib/logging/__init__.py#L420
+ # https://github.com/python/cpython/blob/3.10/Lib/logging/__init__.py#L665-L695
73
+
74
+ # set format for the style class
75
+ self._style._fmt = self.formats.get(record.levelno)
76
+ # call the default formatting fuction
77
+ return logging.Formatter.format(self, record)
0 commit comments