[Zope-Checkins] CVS: ZODB3/zLOG - EventLogger.py:1.4.2.3

Guido van Rossum guido@python.org
Wed, 18 Dec 2002 15:01:26 -0500


Update of /cvs-repository/ZODB3/zLOG
In directory cvs.zope.org:/tmp/cvs-serv9739

Modified Files:
      Tag: ZODB3-fast-restart-branch
	EventLogger.py 
Log Message:
initialize_from_environment(): don't make 'logging' a local variable
as a side effect of 'import logging.config'.  It's also a global and
that's used elsewhere in the same function.  This bug showed up when
using STUPID_LOG_FILE=; a later reference to 'logging' raised
UnboundLocalError.


=== ZODB3/zLOG/EventLogger.py 1.4.2.2 => 1.4.2.3 ===
--- ZODB3/zLOG/EventLogger.py:1.4.2.2	Tue Dec 17 18:53:05 2002
+++ ZODB3/zLOG/EventLogger.py	Wed Dec 18 15:01:21 2002
@@ -167,8 +167,8 @@
     # set up from logging config file
     configfile = get_env_logging_config()
     if configfile:
-        import logging.config
-        logging.config.fileConfig(configfile)
+        import logging.config as config
+        config.fileConfig(configfile)
 
     # set up syslog handler if necessary
     facility, syslogdest = get_env_syslog_info()