[Zodb-checkins] CVS: Zope/lib/python/zLOG - EventLogger.py:1.6
Guido van Rossum
guido@python.org
Mon, 13 Jan 2003 10:17:33 -0500
Update of /cvs-repository/Zope/lib/python/zLOG
In directory cvs.zope.org:/tmp/cvs-serv19336
Modified Files:
EventLogger.py
Log Message:
Add the NullHandler back, and a comment explaining why it's needed.
=== Zope/lib/python/zLOG/EventLogger.py 1.5 => 1.6 ===
--- Zope/lib/python/zLOG/EventLogger.py:1.5 Tue Jan 7 13:35:12 2003
+++ Zope/lib/python/zLOG/EventLogger.py Mon Jan 13 10:17:30 2003
@@ -27,7 +27,10 @@
class EventLogger(BaseLogger):
+ # Get our logger object:
logger = logging.getLogger('event')
+ # Add a null handler to prevent warnings about loggers with no handlers:
+ logger.addHandler(NullHandler())
def log(self, subsystem, severity, summary, detail, error):