Popular recipes by Hank http://code.activestate.com/recipes/users/4178168/2011-06-01T19:05:40-07:00ActiveState Code RecipesSimple creation, configuration and installation of logging handlers (Python)
2011-06-01T19:05:40-07:00Hankhttp://code.activestate.com/recipes/users/4178168/http://code.activestate.com/recipes/577731-simple-creation-configuration-and-installation-of-/
<p style="color: grey">
Python
recipe 577731
by <a href="/recipes/users/4178168/">Hank</a>
(<a href="/recipes/tags/logging/">logging</a>).
</p>
<p>A helper class and function to make it easy to configure logging, and an example of using it to send <code>INFO</code> to <code>sys.stdout</code> and <code>WARNING</code> or above to <code>sys.stderr</code>.</p>
<p>This is a simple port to Python 2 (I tested on 2.7) of <a href="http://code.activestate.com/recipes/577496-simple-creation-configuration-and-installation-of-/">Nick Coghlan's Python 3 recipe</a> for doing the same thing.</p>