Popular recipes by Kent Johnson http://code.activestate.com/recipes/users/2016182/popular/2007-09-19T06:52:58-07:00ActiveState Code RecipesError logging with context manager and decorator (Python)
2007-09-19T06:52:58-07:00Kent Johnsonhttp://code.activestate.com/recipes/users/2016182/http://code.activestate.com/recipes/531821-error-logging-with-context-manager-and-decorator/
<p style="color: grey">
Python
recipe 531821
by <a href="/recipes/users/2016182/">Kent Johnson</a>
(<a href="/recipes/tags/shortcuts/">shortcuts</a>).
</p>
<p>A context manager and decorator that wrap common exception trapping and handling code so they may be applied with just a single line of code in the client.</p>