Top-rated recipes tagged "basicconfig"http://code.activestate.com/recipes/tags/basicconfig/top/2010-01-06T06:54:09-08:00ActiveState Code RecipesOne-word logging.basicConfig wrapper (Python) 2010-01-06T06:54:09-08:00Denis Barmenkovhttp://code.activestate.com/recipes/users/57155/http://code.activestate.com/recipes/576994-one-word-loggingbasicconfig-wrapper/ <p style="color: grey"> Python recipe 576994 by <a href="/recipes/users/57155/">Denis Barmenkov</a> (<a href="/recipes/tags/basicconfig/">basicconfig</a>, <a href="/recipes/tags/logging/">logging</a>, <a href="/recipes/tags/wrapper/">wrapper</a>). Revision 2. </p> <p>Every Python logging manual have this code:</p> <pre class="prettyprint"><code>logging.basicConfig(level=logging.DEBUG, filename='debug.log', format='%(asctime)s %(levelname)s: %(message)s', datefmt='%Y-%m-%d %H:%M:%S') </code></pre> <p>This is a simple function which call it for you. All you need is remember one function name; useful on little scripts.</p>