[Zodb-checkins] CVS: Zope3/lib/python/ZEO/tests - zeoserver.py:1.4

Guido van Rossum guido@python.org
Thu, 19 Dec 2002 15:50:20 -0500


Update of /cvs-repository/Zope3/lib/python/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv29929/lib/python/ZEO/tests

Modified Files:
	zeoserver.py 
Log Message:
Configure logging from log.ini

=== Zope3/lib/python/ZEO/tests/zeoserver.py 1.3 => 1.4 ===
--- Zope3/lib/python/ZEO/tests/zeoserver.py:1.3	Thu Dec 19 15:35:53 2002
+++ Zope3/lib/python/ZEO/tests/zeoserver.py	Thu Dec 19 15:50:20 2002
@@ -111,10 +111,12 @@
 def main():
 
     # Initialize the logging module.
-    # XXX Should allow finer control through environment.
-    import logging
+    import logging.config
     logging.basicConfig()
     logging.root.setLevel(logging.CRITICAL)
+    # If log.ini exists, use it
+    if os.path.exists("log.ini"):
+        logging.config.fileConfig("log.ini")
 
     label = 'zeoserver:%d' % os.getpid()
     log(label, 'starting')