Closes #25685: Made SocketHandler emission more efficient.

This commit is contained in:
Vinay Sajip 2015-12-26 12:48:44 +00:00
parent f81be8aa3f
commit 9cdfd18fc6
1 changed files with 2 additions and 0 deletions

View File

@ -588,6 +588,8 @@ class SocketHandler(logging.Handler):
d['msg'] = record.getMessage()
d['args'] = None
d['exc_info'] = None
# Issue #25685: delete 'message' if present: redundant with 'msg'
d.pop('message', None)
s = pickle.dumps(d, 1)
slen = struct.pack(">L", len(s))
return slen + s