Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3f58277

Browse files
committed
Closes #18671: Output more information when logging exceptions occur.
1 parent d119b7b commit 3f58277

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

Lib/logging/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,9 @@ def handleError(self, record):
899899
# couldn't find the right stack frame, for some reason
900900
sys.stderr.write('Logged from file %s, line %s\n' % (
901901
record.filename, record.lineno))
902+
# Issue 18671: output logging message and arguments
903+
sys.stderr.write('Message: %r\n'
904+
'Arguments: %s\n' % (record.msg, record.args))
902905
except OSError: #pragma: no cover
903906
pass # see issue 5971
904907
finally:

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Core and Builtins
2222
Library
2323
-------
2424

25+
- Issue #18671: Output more information when logging exceptions occur.
26+
2527
- Issue #18621: Prevent the site module's patched builtins from keeping
2628
too many references alive for too long.
2729

0 commit comments

Comments
 (0)