New submission from Marvin Greenberg:

In logging.handlers.SocketHandler.makePickle code was added for issue 14436 
that replaces the 'msg' in the log record dict with the formatted message.  But 
if an earlier handler already formatted the message, it will have been added to 
the log record with key 'message'.  In this case the identical message will be 
sent across the wire twice in the pickled data.

The patch simply deletes the 'message' entry from the dict.  More involved 
changes (like reusing record.message instead of calling getMessage) probably 
not useful.

----------
components: Library (Lib)
files: handlers.py.patch
keywords: patch
messages: 255011
nosy: Marvin Greenberg
priority: normal
severity: normal
status: open
title: Inefficiency with SocketHandler - may send log record message string 
twice in pickled data structure
type: resource usage
versions: Python 3.5
Added file: http://bugs.python.org/file41104/handlers.py.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25685>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to