[Zope3-checkins] CVS: Zope3 - test.py:1.33.2.3

Guido van Rossum guido@python.org
Tue, 24 Dec 2002 12:28:03 -0500


Update of /cvs-repository/Zope3
In directory cvs.zope.org:/tmp/cvs-serv13156

Modified Files:
      Tag: NameGeddon-branch
	test.py 
Log Message:
Change logging policy for testing:
- Logging always goes to stderr.
- Environment variable LOGGING specifies the numeric logging level.
- Default logging level remains CRITICAL.
- NO more look for ini.log.  (z3.py and runsvr.py still use it.)


=== Zope3/test.py 1.33.2.2 => 1.33.2.3 ===
--- Zope3/test.py:1.33.2.2	Tue Dec 24 11:18:05 2002
+++ Zope3/test.py	Tue Dec 24 12:27:32 2002
@@ -442,10 +442,12 @@
     # Initialize the logging module.
     import logging.config
     logging.basicConfig()
-    logging.root.setLevel(logging.CRITICAL)
-    # If log.ini exists, use it
-    if os.path.exists(logini):
-        logging.config.fileConfig(logini)
+    level = os.getenv("LOGGING")
+    if level:
+        level = int(level)
+    else:
+        level = logging.CRITICAL
+    logging.root.setLevel(level)
 
     files = find_tests(module_filter)
     files.sort()