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

Fred L. Drake, Jr. fred at zope.com
Wed Mar 17 15:15:32 EST 2004


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

Modified Files:
	test.py 
Log Message:
Make the logging configuration make a little more sense.  Use the
LOGGING environment variable as an override if present, but don't
clobber a setting from log.ini if LOGGING is not defined.


=== Zope3/test.py 1.89 => 1.90 ===
--- Zope3/test.py:1.89	Tue Mar 16 00:15:16 2004
+++ Zope3/test.py	Wed Mar 17 15:15:30 2004
@@ -713,14 +713,12 @@
     logging.basicConfig()
 
     level = os.getenv("LOGGING")
-    if level:
-        level = int(level)
-    else:
-        level = logging.CRITICAL
-    logging.root.setLevel(level)
-
     if os.path.exists(logini):
         logging.config.fileConfig(logini)
+        if level:
+            logging.root.setLevel(int(level))
+    elif level:
+        logging.root.setLevel(int(level))
 
     files = find_tests(module_filter)
     files.sort()




More information about the Zope3-Checkins mailing list