diff options
| author | Barry Warsaw | 2009-01-06 21:35:00 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2009-01-06 21:35:00 -0500 |
| commit | 994d079ea50deb58b20c41e506e29278c3c93257 (patch) | |
| tree | 3677fbe2a3db8824d8a8889487c6f06bc173d615 | |
| parent | 89f5f76ed31d6ca2faf8e2a783a37e9009b03413 (diff) | |
| download | mailman-994d079ea50deb58b20c41e506e29278c3c93257.tar.gz mailman-994d079ea50deb58b20c41e506e29278c3c93257.tar.zst mailman-994d079ea50deb58b20c41e506e29278c3c93257.zip | |
| -rw-r--r-- | mailman/core/logging.py | 11 | ||||
| -rw-r--r-- | mailman/testing/layers.py | 3 |
2 files changed, 12 insertions, 2 deletions
diff --git a/mailman/core/logging.py b/mailman/core/logging.py index ce79761ca..43abac78d 100644 --- a/mailman/core/logging.py +++ b/mailman/core/logging.py @@ -40,6 +40,17 @@ _handlers = {} +# XXX I would love to simplify things and use Python 2.6's WatchedFileHandler, +# but there are two problems. First, it's more difficult to handle the test +# suite's need to reopen the file handler to a different path. Does +# zope.testing's logger support fix this? +# +# The other problem is that WatchedFileHandler doesn't really easily support +# HUPing the process to reopen the log file. Now, maybe that's not a big deal +# because the standard logging module would already handle things correctly if +# the file is moved, but still that's not an interface I'm ready to give up on +# yet. For now, keep our hack. + class ReopenableFileHandler(logging.Handler): """A file handler that supports reopening.""" diff --git a/mailman/testing/layers.py b/mailman/testing/layers.py index 0bac91c5c..f3a4266fd 100644 --- a/mailman/testing/layers.py +++ b/mailman/testing/layers.py @@ -87,8 +87,7 @@ class ConfigLayer: level: debug """) # Enable log message propagation and reset the log paths so that the - # doctests can check the output. XXX Switch to using the log support - # in zope.testing. + # doctests can check the output. for logger_config in config.logger_configs: sub_name = logger_config.name.split('.')[-1] if sub_name == 'root': |
