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 27347d9 commit e398c57Copy full SHA for e398c57
src/logfmter/formatter.py
@@ -245,7 +245,10 @@ def format(self, record: logging.LogRecord) -> str:
245
if record.exc_info:
246
# Cast exc_info to its not null variant to make mypy happy.
247
exc_info = cast(ExcInfo, record.exc_info)
248
+ tokens.append(f"exc_info={self.format_exc_info(exc_info)}")
249
- tokens.append("exc_info={}".format(self.format_exc_info(exc_info)))
250
+ if record.stack_info:
251
+ stack_info = self.formatStack(record.stack_info).rstrip("\n")
252
+ tokens.append(f"stack_info={self.format_string(stack_info)}")
253
254
return " ".join(tokens)
0 commit comments