Added an initialize and a cleanup method to allow initialization and cleanup of the logging system.
Added an initialize and a cleanup method to allow initialization and
cleanup of the logging system.

Implemented the logging system as discussed on the mailinglist.
http://sourceforge.net/mailarchive/forum.php?thread_id=6946268&forum_id=24361

Additional to the API discussed in the above thread there exists another
function named 'log_caller' which logs some info about the calling
function/method. This can be handy while developing.

Usage:
  import tools
  tools.log_caller() # logs frame 1
  tools.log_caller(2)
  tools.log_caller(3, log_file="/path/to/file")

This creates log records like:
2005-04-03 19:23:10,696 [INFO]:
  module: wsgi_app
  filename: /path/to/wsgi_app.py
  line: 94
  subroutine: application
2005-04-03 19:23:10,698 [INFO]:
  module: wsgiref.handlers
  filename: /usr/lib/python2.3/site-packages/wsgiref/handlers.py
  line: 92
  subroutine: run


willkg/douglas,willkg/douglas,daitangio/pyblosxom,daitangio/pyblosxom