New submission from Nicolas Dumazet <nicd...@gmail.com>: Hello!
gc.set_debug is provided to help debugging a leaking program. That tool can be very useful indeed. Debugging information, however, is written to sys.stderr, and there are cases where this behavior can be a problem: chances are that stderr can be already used to output other information. Currently, to debug a verbose program writing to stderr, one has to either first reduce/suppress the stderr output noise from its program before activating set_debug, OR has to redirect the whole mixed stderr output, and filter it afterwards. I'd like very much the possibility to configure myself where the gc debugger will write its output. My suggestion would be to have set_debug converted from set_debug(flags) to set_debug(flags, stream=sys.stderr), stream being any valid file object, but any solution allowing me to customize the output target of the gc debugger would be welcome. Thanks! ---------- components: Extension Modules messages: 86647 nosy: nicdumz severity: normal status: open title: Add a stream parameter to gc.set_debug type: feature request versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5851> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com