Popular recipes by Michael Blan Palmer http://code.activestate.com/recipes/users/4194130/2016-05-27T01:07:42-07:00ActiveState Code RecipesJSON Formatted Logging (Python) 2016-05-27T01:07:42-07:00Michael Blan Palmerhttp://code.activestate.com/recipes/users/4194130/http://code.activestate.com/recipes/580667-json-formatted-logging/ <p style="color: grey"> Python recipe 580667 by <a href="/recipes/users/4194130/">Michael Blan Palmer</a> (<a href="/recipes/tags/json/">json</a>, <a href="/recipes/tags/logging/">logging</a>, <a href="/recipes/tags/python/">python</a>). </p> <p>I have created a package that outputs JSON formatted lines to a log file. It can make use of the standard logging parameters and/or take custom input. The use of JSON in the log file allows for easy filtering and processing.</p> Configurable JSON Extensions for Python (Python) 2016-05-22T19:00:54-07:00Michael Blan Palmerhttp://code.activestate.com/recipes/users/4194130/http://code.activestate.com/recipes/580664-configurable-json-extensions-for-python/ <p style="color: grey"> Python recipe 580664 by <a href="/recipes/users/4194130/">Michael Blan Palmer</a> (<a href="/recipes/tags/json/">json</a>, <a href="/recipes/tags/python/">python</a>). </p> <p>The concept behind the package is to build a single class per type you want to add to json in Python. The new class will have a method for encoding to json and a method for decoding from json. The classes are then loaded into an encoder object and a decoder object that are hooked into the standard json loads and dumps functions.</p>