[Zope3-checkins] CVS: Zope3/src/zodb/zeo/tests - zeoserver.py:1.1.2.4
Guido van Rossum
guido@python.org
Tue, 24 Dec 2002 12:27:33 -0500
Update of /cvs-repository/Zope3/src/zodb/zeo/tests
In directory cvs.zope.org:/tmp/cvs-serv13156/src/zodb/zeo/tests
Modified Files:
Tag: NameGeddon-branch
zeoserver.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/src/zodb/zeo/tests/zeoserver.py 1.1.2.3 => 1.1.2.4 ===
--- Zope3/src/zodb/zeo/tests/zeoserver.py:1.1.2.3 Mon Dec 23 18:48:44 2002
+++ Zope3/src/zodb/zeo/tests/zeoserver.py Tue Dec 24 12:27:33 2002
@@ -106,10 +106,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("log.ini"):
- logging.config.fileConfig("log.ini")
+ level = os.getenv("LOGGING")
+ if level:
+ level = int(level)
+ else:
+ level = logging.CRITICAL
+ logging.root.setLevel(level)
# Create a logger
logger = logging.getLogger('zeoserver.%d' % os.getpid())