E&S CVS Commit: PEAK - First pass of 'logs' framework refactoring. Highlights include:
pje at eby-sarna.com
pje at eby-sarna.com
Sun Dec 28 15:59:01 EST 2003
Module Name: PEAK
Committed By: pje
Date: Sun Dec 28 20:58:28 UTC 2003
Modified Files:
PEAK: CHANGES.txt TODO.txt
PEAK/src/peak: peak.ini
PEAK/src/peak/config: config_components.py
PEAK/src/peak/config/tests: __init__.py
PEAK/src/peak/naming/tests: __init__.py
PEAK/src/peak/running: logs.py
PEAK/src/peak/running/tests: __init__.py
PEAK/src/peak/storage: DDE.py
Added Files:
PEAK/src/peak/running/tests: test_logs.py
Log Message:
First pass of 'logs' framework refactoring. Highlights include:
* Lots of new unit tests for logging.
* Logs are now accessed via a 'logs.ILoggingService' instance. The
'logger:' URL scheme automatically accesses the nearest such service.
For backward compatibility, the old 'peak.logs' namespace is still used
to supply the actual loggers. This will be gradually replaced with a
plugin-based mechanism.
* Log events don't use a positional 'message' argument any more, and
loggers aren't responsible for interpolating message arguments any more.
The new signature is 'Event(parent, msg=msg, args=args, ...)'. Loggers
also now tell events what logger name they are, via the 'ident' keyword.
* The logging system now uses a property namespace, 'peak.logging.levels',
to obtain log level names and values. The various 'logs.LEVEL'
constants are now DEPRECATED. Please use the 'getLevelFor()' method of
the nearest 'logs.ILoggingService' instead. URL schemes such as
'logfile:' also no longer convert their level names to numbers, since
the level names are only meaningful in the context of a logging service.
* Support for integration with the Python 2.3/PEP 282 logging module has
been scaled back. There are too many globalisms and dependencies there.
When we add plugin-based log configuration, it should be possible to use
the logging package's handlers and formatters with the PEAK logging
services. At that point, you'll be able to replace 'logging.getLogger'
and 'logging.getLevelName' with the corresponding methods of a PEAK
logging service, if you need to force non-PEAK packages to use PEAK's
logging.
* 'config.Namespace()' objects now have a 'keys()' method that can be used
when the namespace is bound to a context component. It returns a list
of strings that may be used as keys for that namespace. See
'CHANGES.txt' for an example.
To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PEAK/CHANGES.txt.diff?r1=1.116&r2=1.117
http://cvs.eby-sarna.com/PEAK/TODO.txt.diff?r1=1.90&r2=1.91
http://cvs.eby-sarna.com/PEAK/src/peak/peak.ini.diff?r1=1.110&r2=1.111
http://cvs.eby-sarna.com/PEAK/src/peak/config/config_components.py.diff?r1=1.73&r2=1.74
http://cvs.eby-sarna.com/PEAK/src/peak/config/tests/__init__.py.diff?r1=1.30&r2=1.31
http://cvs.eby-sarna.com/PEAK/src/peak/naming/tests/__init__.py.diff?r1=1.21&r2=1.22
http://cvs.eby-sarna.com/PEAK/src/peak/running/logs.py.diff?r1=1.30&r2=1.31
http://cvs.eby-sarna.com/PEAK/src/peak/running/tests/__init__.py.diff?r1=1.12&r2=1.13
http://cvs.eby-sarna.com/PEAK/src/peak/running/tests/test_logs.py?rev=1.1&content-type=text/vnd.viewcvs-markup
http://cvs.eby-sarna.com/PEAK/src/peak/storage/DDE.py.diff?r1=1.10&r2=1.11
To generate a diff of this commit:
cvs rdiff -r1.116 -r1.117 PEAK/CHANGES.txt
cvs rdiff -r1.90 -r1.91 PEAK/TODO.txt
cvs rdiff -r1.110 -r1.111 PEAK/src/peak/peak.ini
cvs rdiff -r1.73 -r1.74 PEAK/src/peak/config/config_components.py
cvs rdiff -r1.30 -r1.31 PEAK/src/peak/config/tests/__init__.py
cvs rdiff -r1.21 -r1.22 PEAK/src/peak/naming/tests/__init__.py
cvs rdiff -r1.30 -r1.31 PEAK/src/peak/running/logs.py
cvs rdiff -r1.12 -r1.13 PEAK/src/peak/running/tests/__init__.py
cvs rdiff -r0 -r1.1 PEAK/src/peak/running/tests/test_logs.py
cvs rdiff -r1.10 -r1.11 PEAK/src/peak/storage/DDE.py
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
More information about the source-changes
mailing list