[Zope-Checkins] CVS: Zope - z2.py:1.90

Chris McDonough chrism@zope.com
Sun, 24 Nov 2002 00:25:57 -0500


Update of /cvs-repository/Zope
In directory cvs.zope.org:/tmp/cvs-serv18817

Modified Files:
	z2.py 
Log Message:
Changes to support PEP282-based logger instead of minimal logger/ZLogger.


=== Zope/z2.py 1.89 => 1.90 ===
--- Zope/z2.py:1.89	Wed Nov 13 05:38:38 2002
+++ Zope/z2.py	Sun Nov 24 00:25:57 2002
@@ -537,6 +537,13 @@
 # will write to this pidfile instead of Zope.
 PID_FILE=os.path.join(CLIENT_HOME, 'Z2.pid')
 
+# Import logging support
+import zLOG
+
+if not READ_ONLY:
+    # possibly write an event log file
+    zLOG.initialize()
+
 if USE_DAEMON and not READ_ONLY:
     import App.FindHomes
     sys.ZMANAGED=1
@@ -553,18 +560,6 @@
                                "dedicated user account for Zope") )
 
 try:
-    # Import logging support
-    import zLOG
-    import ZLogger
-
-    if READ_ONLY:
-        if hasattr(zLOG, '_set_stupid_dest'):
-            zLOG._set_stupid_dest(sys.stderr)
-        else:
-            zLOG._stupid_dest = sys.stderr
-    else:
-        zLOG.log_write = ZLogger.ZLogger.log_write
-
     if DETAILED_LOG_FILE:
         from ZServer import DebugLogger
         logfile=os.path.join(CLIENT_HOME, DETAILED_LOG_FILE)