]> granicus.if.org Git - python/commitdiff
Closes #18671: Output more information when logging exceptions occur.
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Thu, 8 Aug 2013 17:28:53 +0000 (18:28 +0100)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Thu, 8 Aug 2013 17:28:53 +0000 (18:28 +0100)
Lib/logging/__init__.py
Misc/NEWS

index 46298605c45a6101b8eedc9dea85983138405844..3ecce734251f61524f472959d4d98e33c029d695 100644 (file)
@@ -899,6 +899,9 @@ class Handler(Filterer):
                     # couldn't find the right stack frame, for some reason
                     sys.stderr.write('Logged from file %s, line %s\n' % (
                                      record.filename, record.lineno))
+                # Issue 18671: output logging message and arguments
+                sys.stderr.write('Message: %r\n'
+                                 'Arguments: %s\n' % (record.msg, record.args))
             except OSError: #pragma: no cover
                 pass    # see issue 5971
             finally:
index d1f0761830b38fb1cd05fd4741910375411c4ae8..261402e68276acac458dcdc26397da657bf7d712 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -22,6 +22,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #18671: Output more information when logging exceptions occur.
+
 - Issue #18621: Prevent the site module's patched builtins from keeping
   too many references alive for too long.