This repository was archived by the owner on Nov 23, 2017. It is now read-only.
This repository was archived by the owner on Nov 23, 2017. It is now read-only.
Add source traceback to transports #212
Open
Description
Hi,
I created a new "traceback" branch to enhance debug in asyncio. The idea is to
provide the "head" of an error (traceback where the object was created), not
only the "tail" (current traceback). I already started this work in tasks, but
I would like to extend the idea to other objects.
The main change is to add a source traceback to transport classes (socket,
subprocess, pipe, etc.).
Overall patch:
http://codereview.appspot.com/171720043
I also added a new BaseEventLoop._get_traceback() method which tries uses
traceback.extract_stack() but also "injects" the source traceback of the
current task.
This idea may be extended to all logs using exc_info=True: the traceback may be
retrieved from loop._get_traceback() to get the injected traceback from the
task.
The new _format_source_traceback() function is used where the logger is called
with exc_info=True.
Original issue reported on code.google.com by victor.s...@gmail.com
on 30 Oct 2014 at 11:55