[Zodb-checkins] CVS: StandaloneZODB/ZEO - start.py:1.40

Jeremy Hylton jeremy@zope.com
Mon, 5 Aug 2002 17:44:22 -0400


Update of /cvs-repository/StandaloneZODB/ZEO
In directory cvs.zope.org:/tmp/cvs-serv21511

Modified Files:
	start.py 
Log Message:
Make log rotation code work with a wider range of zLOG versions.


=== StandaloneZODB/ZEO/start.py 1.39 => 1.40 ===
 
 def rotate_logs():
     import zLOG
+    # There hasn't been a clear way to reinitialize the MinimalLogger.
+    # I'll checkin the public initialize() method soon, but also try some
+    # other strategies for older Zope installs :-(.
     init = getattr(zLOG, 'initialize', None)
     if init is not None:
         init()
+        return
+    # This will work if the minimal logger is in use, but not if some
+    # other logger is active.
+    import zLog.MinimalLogger
+    zLog.MinimalLogger._log.initialize()
 
 def rotate_logs_handler(signum, frame):
     rotate_logs()