ANN: Logging Module v0.4.5 released

Vinay Sajip vinay_sajip at yahoo.co.uk
Tue Jun 4 20:19:11 EDT 2002


A new version of the proposed Python standard logging module (as per
PEP 282) has been released. You can get all the information from

http://www.red-dove.com/python_logging.html

There are "download" and "recent changes" links at the top of that
page. The new stuff includes some bug fixes, better support for
class-based filtering and logging, more documentation of the
configuration file format, an example hand-coded configuration file
for those people who can't use the GUI configurator, an example Filter
for regular-expression match-based filtering, and more!

As always, your feedback is most welcome (especially bug reports,
patches and suggestions for improvement).

Cheers

Vinay Sajip
Red Dove Consultants Ltd.

Changes since the last version:
=================================
Fixed bug which caused problem if no args to message (suggested by
Hye-Shik Chang).
Fixed bug in _fixupParents (thanks to Nicholas Veeser) and added
log_test19.py as a test case for this bug.
Added getMessage to LogRecord (code was moved here from
Formatter.format).
Applied str() to record.msg to allow arbitrary classes to determine
the formatting (as msg can now be a class instance).
Table of Contents added to python_logging.html, the section on Loggers
updated, and the logconf.ini file section annotated.
Added log_test20.py which demonstrates how to use class instances to
provide alternatives to numeric severities as mechanisms for control
of logging.
Added log_test21.py which builds on log_test20.py to show how you can
use a regular expression-based Filter for flexible matching similar to
e.g. Protomatter Syslog, where you can filter on e.g. "a.*" or "*.b"
or "a.*.c".
_levelNames changed to contain reverse mappings as well as forward
mappings (leveltext->level as well as level -> leveltext). The reverse
mappings are used by fileConfig().
fileConfig() now more forgiving of missing options in .ini file -
sensible defaults now used when some options are absent. Also, eval()
is used less when interpreting .ini file contents - int() and dict
lookup are used in more places.



More information about the Python-list mailing list