[Python-ideas] Passive tracing of function objects (was: Efficient debug logging)
C Anthony Risinger
anthony at xtfx.me
Wed Feb 15 11:48:22 EST 2017
On Wed, Feb 15, 2017 at 10:45 AM, C Anthony Risinger <anthony at xtfx.me>
wrote:
> On Tue, Feb 14, 2017 at 3:55 PM, Barry <barry at barrys-emacs.org> wrote:
>>
>>
>> The point is that the cost of creating the msg argument can be very high.
>>
>> At the point that logging decides to skip output it is to late to save
>> the cost of creating the arg tuple.
>>
>
> Awhile back I was playing with some code for the purpose of adding debug
> logs "after the fact":
>
> https://github.com/anthonyrisinger/retrospect/blob/master/README.rst
>
> I'm not trying to plug it (It's POC, broken, and Python 2) but maybe there
> is some value because I was trying to solve a similar problem of fast and
> easy debugging and logs.
>
I meant to note that I did in fact use this (plus a wrapper that would take
an ENV var with the function to target) a few times to inspect code running
deep in Django without ever editing any Django code. It also works for
inspecting code you can't edit, say modules installed globally into /usr.
--
C Anthony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170215/c84bdcd9/attachment.html>
More information about the Python-ideas
mailing list