[Zodb-checkins] CVS: ZODB3/ZEO - runzeo.py:1.4

Guido van Rossum guido@python.org
Fri, 17 Jan 2003 15:19:31 -0500


Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv13234

Modified Files:
	runzeo.py 
Log Message:
Use the automatic <logger> section processing from zdoptions.


=== ZODB3/ZEO/runzeo.py 1.3 => 1.4 ===
--- ZODB3/ZEO/runzeo.py:1.3	Fri Jan 17 13:12:22 2003
+++ ZODB3/ZEO/runzeo.py	Fri Jan 17 15:19:28 2003
@@ -87,33 +87,17 @@
         self.add("monitor_address", None, "m:", "monitor=",
                  self.handle_monitor_address)
 
-    def load_logconf(self):
-        if self.configroot.logger is not None:
-            zLOG.set_initializer(self.log_initializer)
-            zLOG.initialize()
-
-    def log_initializer(self):
-        from zLOG import EventLogger
-        logger = self.configroot.logger()
-        for handler in logger.handlers:
-            if hasattr(handler, "reopen"):
-                handler.reopen()
-        EventLogger.event_logger.logger = logger
-
 
 class ZEOOptions(ZDOptions, ZEOOptionsMixin):
 
+    logsectionname = "logger"
+
     def __init__(self):
         self.schemadir = os.path.dirname(__file__)
         ZDOptions.__init__(self)
         self.add_zeo_options()
         self.add("storages", "storages",
                  required="no storages specified; use -f or -C")
-
-    def realize(self, *args):
-        ZDOptions.realize(self, *args)
-        if self.configroot is not None:
-            self.load_logconf()
 
 
 class ZEOServer: