ANN: Logging Module v0.4.5 released

Vinay Sajip vinay_sajip at
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

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).


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 as a test case for this bug.
Added getMessage to LogRecord (code was moved here from
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 which demonstrates how to use class instances to
provide alternatives to numeric severities as mechanisms for control
of logging.
Added which builds on 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