ANN: Logging Module v0.4.4 released
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 logrecv.py
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, log_test.py.
This produces files stdout.log and stderr.log which could be used for
As always, your feedback is most welcome (especially bug reports,
patches and suggestions for improvement).
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 logrecv.py.
Added log_test18.py to illustrate MatchFilter, which is a general
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 logrecv.py to support stopping servers programmatically.
Added log_test.py as overall test harness.
basicConfig() can now be safely called more than once.
Modified test scripts to make it easier to call them from log_test.py.
Moved SOAPHandler from core to log_test13.py. It's not general enough
to be in the core; most production use will have differing RPC