<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Feb 15, 2017 at 10:45 AM, C Anthony Risinger <span dir="ltr"><<a href="mailto:anthony@xtfx.me" target="_blank">anthony@xtfx.me</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Feb 14, 2017 at 3:55 PM, Barry <span dir="ltr"><<a href="mailto:barry@barrys-emacs.org" target="_blank">barry@barrys-emacs.org</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><span class="gmail-m_1169707311314504346gmail-"><div><br></div></span><div>The point is that the cost of creating the msg argument can be very high.</div><div><br></div><div>At the point that logging decides to skip output it is to late to save the cost of creating the arg tuple.<br></div></div></blockquote><div><br></div><div>Awhile back I was playing with some code for the purpose of adding debug logs "after the fact":<br></div><div><br></div><div><a href="https://github.com/anthonyrisinger/retrospect/blob/master/README.rst" target="_blank">https://github.com/<wbr>anthonyrisinger/retrospect/<wbr>blob/master/README.rst</a><br></div><div><br></div><div>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.</div></div></div></div></blockquote></div><div class="gmail_extra"><br></div>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.<br clear="all"><div><br></div>-- <br><div class="gmail_signature"><br>C Anthony</div>
</div></div>