summaryrefslogtreecommitdiff
path: root/mailman/core/logging.py
diff options
context:
space:
mode:
authorBarry Warsaw2009-01-06 21:35:00 -0500
committerBarry Warsaw2009-01-06 21:35:00 -0500
commit994d079ea50deb58b20c41e506e29278c3c93257 (patch)
tree3677fbe2a3db8824d8a8889487c6f06bc173d615 /mailman/core/logging.py
parent89f5f76ed31d6ca2faf8e2a783a37e9009b03413 (diff)
downloadmailman-994d079ea50deb58b20c41e506e29278c3c93257.tar.gz
mailman-994d079ea50deb58b20c41e506e29278c3c93257.tar.zst
mailman-994d079ea50deb58b20c41e506e29278c3c93257.zip
Diffstat (limited to 'mailman/core/logging.py')
-rw-r--r--mailman/core/logging.py11
1 files changed, 11 insertions, 0 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."""