Popular Python recipes tagged "meta:requires=repr"http://code.activestate.com/recipes/langs/python/tags/meta:requires=repr/popular/2011-04-29T02:23:37-07:00ActiveState Code RecipesTiny trace/debug-logging tool with smart event filtering (Python)
2011-04-29T02:23:37-07:00Jan Kaliszewskihttp://code.activestate.com/recipes/users/4172762/http://code.activestate.com/recipes/577429-tiny-tracedebug-logging-tool-with-smart-event-filt/
<p style="color: grey">
Python
recipe 577429
by <a href="/recipes/users/4172762/">Jan Kaliszewski</a>
(<a href="/recipes/tags/debugging/">debugging</a>, <a href="/recipes/tags/logging/">logging</a>, <a href="/recipes/tags/trace/">trace</a>).
Revision 3.
</p>
<ul>
<li><p>Just import, call and log your selected call/return/exception/etc. events.</p></li>
<li><p>You can use a standard Python logger from the <code>logging</code> module.</p></li>
<li><p>Quite flexible tool and about 50 efective SLOC only (excluding the example script).</p></li>
<li><p>For debugging rather than production environments (programs noticeably slow down).</p></li>
</ul>