
I've got a set of patches which I want to make to logging:
Please upload to SF ASAP -- I'd like to do another alpha next Tuesday. Please send forward context or unified diffs relative to current CVS!
1. Added the record being processed as a parameter to handleError.
OK.
2. Handler.handle returns the result of applying the filter to the record.
OK.
3. Added a seek(0, 2) in RotatingFileHandler before the tell() call. This is because under Windows, tell() returns 0 until the first actual write.
OK.
4. Renamed warn and WARN to warning and WARNING. This may break existing code, but the standard Python module will use warning/WARNING rather than warn/WARN.
OK, but please leave warn/WARN in as synonyms.
The fatal and FATAL synonyms for critical and CRITICAL have also been removed.
NOT OK. Please leave them in as synonyms.
5. Added a defaultEncoding attribute and some simple support for encoding Unicode messages.
See Marc-Andre's reply.
6. Added process ID to the list of LogRecord attributes.
OK.
7. Modified Logger.removeHandler so that it does not close the handler on removal.
OK.
As far as point 4 is concerned, I feel that the last discussion on python-dev was inconclusive. The consensus seemed to say WARNING and CRITICAL were OK, but then there was some doubt about WARNING due to the number of changes Zope would need. Though Zope is an important application, I'm not sure Zope changes should be the yardstick for this sort of change; From looking for instances of WARN and warn in the .py files from a recent read-only checkout of Zope, I couldn't see all that many places where changes would be needed. Have I missed something?
Did you check Zope 3 too? It's got more of these I think. But if you submit patches for Python, I can take care of Zope 3. --Guido van Rossum (home page: http://www.python.org/~guido/)