mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
bpo-34334: Don't log traceback twice in QueueHandler (GH-9537)
This commit is contained in:
parent
fad6af2744
commit
d345bb4d9b
4 changed files with 23 additions and 5 deletions
|
@ -1374,13 +1374,14 @@ class QueueHandler(logging.Handler):
|
|||
# (if there's exception data), and also returns the formatted
|
||||
# message. We can then use this to replace the original
|
||||
# msg + args, as these might be unpickleable. We also zap the
|
||||
# exc_info attribute, as it's no longer needed and, if not None,
|
||||
# will typically not be pickleable.
|
||||
# exc_info and exc_text attributes, as they are no longer
|
||||
# needed and, if not None, will typically not be pickleable.
|
||||
msg = self.format(record)
|
||||
record.message = msg
|
||||
record.msg = msg
|
||||
record.args = None
|
||||
record.exc_info = None
|
||||
record.exc_text = None
|
||||
return record
|
||||
|
||||
def emit(self, record):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue