logger

Logger is a module for python that allows you to do basic logging very easily and conveniently, while allowing great flexibility. It is designed to be a very practical and convenient logging solution for small to mid-sized (a few thousand lines) programs.

If you're in a hurry, you can simply grab the latest version of the module or the documentation.

Example

      from logger import Logger

      log = Logger(threshold=0)    # create the log object and give it
                                   # a threshold of 0
      log.log(2, 'all done')       # send a log of priority 2 (not printed)
      log(0, 'error: bandits!')    # send a log of priority 0 (printed)
      log.write(0, stringvar)      # do a raw write on the file object

Features

Download

You can download logger here.


Michael Stenner
Last modified: Mon Jun 10 20:22:55 EDT 2002