[Zodb-checkins] CVS: ZODB3/ZEO - start.py:1.58

Guido van Rossum guido@python.org
Fri, 20 Dec 2002 15:01:31 -0500


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

Modified Files:
	start.py 
Log Message:
Log a message when rotating logs.


=== ZODB3/ZEO/start.py 1.57 => 1.58 ===
--- ZODB3/ZEO/start.py:1.57	Fri Dec 13 16:36:15 2002
+++ ZODB3/ZEO/start.py	Fri Dec 20 15:01:31 2002
@@ -313,15 +313,18 @@
     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.  MinimalLogger exists only in Zopes
-    # pre-2.7.
-    try:
-        import zLOG.MinimalLogger
-        zLOG.MinimalLogger._log.initialize()
-    except ImportError:
-        pass
+    else:
+        # This will work if the minimal logger is in use, but not if some
+        # other logger is active.  MinimalLogger exists only in Zopes
+        # pre-2.7.
+        try:
+            import zLOG.MinimalLogger
+            zLOG.MinimalLogger._log.initialize()
+        except ImportError:
+            zLOG.LOG("ZEO/start.py", zLOG.WARNING,
+                     "Caught USR2, could not rotate logs")
+            return
+    zLOG.LOG("ZEO/start.py", zLOG.INFO, "Caught USR2, logs rotated")
 
 def rotate_logs_handler(signum, frame):
     rotate_logs()