[Zodb-checkins] CVS: StandaloneZODB/zLOG - MinimalLogger.py:1.13

Barry Warsaw barry@wooz.org
Fri, 16 Aug 2002 16:28:46 -0400


Update of /cvs-repository/StandaloneZODB/zLOG
In directory cvs.zope.org:/tmp/cvs-serv22218

Modified Files:
	MinimalLogger.py 
Log Message:
Since we have a helper function _set_log_dest(), let's go ahead and
use that everywhere internally instead of setting the global _log_dest
directly.


=== StandaloneZODB/zLOG/MinimalLogger.py 1.12 => 1.13 ===
--- StandaloneZODB/zLOG/MinimalLogger.py:1.12	Wed Aug 14 18:12:33 2002
+++ StandaloneZODB/zLOG/MinimalLogger.py	Fri Aug 16 16:28:45 2002
@@ -48,7 +48,7 @@
         self.initialize()
 
     def initialize(self):
-        global _log_dest, _log_level
+        global _log_level
         eget = os.environ.get
 
         # EVENT_LOG_FILE is the preferred envvar, but we accept
@@ -57,12 +57,12 @@
         if path is None:
             path = eget('STUPID_LOG_FILE')
         if path is None:
-            _log_dest = None
+            _set_log_dest(None)
         else:
             if path:
-                _log_dest = open(path, 'a')
+                _set_log_dest(open(path, 'a'))
             else:
-                _log_dest = sys.stderr
+                _set_log_dest(sys.stderr)
 
         # EVENT_LOG_SEVERITY is the preferred envvar, but we accept
         # STUPID_LOG_SEVERITY also