ANN: Logging Module v0.4.4 released

Vinay Sajip
3 May 2002 05:36:19 -0700

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 is mostly tidying up, but includes a new example
filter, the ability to stop the test servers in
programmatically, easier FileHandler rollover, a new Filter for more
precise match-based filtering, and more! One notable change is that
SOAPHandler moves from the core to an example script. The same
functionality is available - it's just that since RPC method
signatures will probably differ from user to user, there's no point to
hardcoding one in the logging module. Another change is that some of
scripts can now be called from a single test harness,
This produces files stdout.log and stderr.log which could be used for
regression testing.

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:
getEffectiveLevel() returns ALL instead of None when nothing found.
Modified references to level=0 to
level=ALL in a couple of places.
SocketHandler now inherits from Handler (it used to inherit from
StreamHandler, for no good reason).
getLock() renamed to createLock().
Docstring tidy-ups, and some tidying up of DatagramHandler.
Factored out unpickling in
Added to illustrate MatchFilter, which is a general
matching filter.
Improved FileHandler.doRollover() so that the base file name is always
the most recent, then .1, then .2 etc. up to the maximum backup count.
Renamed formal args and attributes used in rollover.
Changed LogRecord attributes lvl -> levelno, level -> levelname (less
Formatter.format searches for "%(asctime)" rather than "(asctime)"
Renamed _start_time to _startTime.
Formatter.formatTime now returns the time.
Altered to support stopping servers programmatically.
Added as overall test harness.
basicConfig() can now be safely called more than once.
Modified test scripts to make it easier to call them from
Moved SOAPHandler from core to It's not general enough
to be in the core; most production use will have differing RPC