[New-bugs-announce] [issue25685] Inefficiency with SocketHandler - may send log record message string twice in pickled data structure
report at bugs.python.org
Fri Nov 20 14:06:50 EST 2015
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)
nosy: Marvin Greenberg
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 <report at bugs.python.org>
More information about the New-bugs-announce