
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 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 the 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 regression testing. 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: ================================= 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 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 ambiguity) 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 signatures.
participants (1)
-
vinay_sajip@yahoo.co.uk