[Zodb-checkins] CVS: Zope/lib/python/zLOG - MinimalLogger.py:1.9 __init__.py:1.6

Chris McDonough chrism@zope.com
Wed, 3 Jul 2002 22:31:54 -0400


Update of /cvs-repository/Zope/lib/python/zLOG
In directory cvs.zope.org:/tmp/cvs-serv17236/lib/python/zLOG

Modified Files:
	MinimalLogger.py __init__.py 
Log Message:
      - The default "start" script now causes the event log to be sent to
        standard output unless the "EVENT_LOG_FILE" or "STUPID_LOG_FILE"
        environment variable is set.

      - The much-hated name "STUPID_LOG_FILE" now has a preferred
        alias:  "EVENT_LOG_FILE".



=== Zope/lib/python/zLOG/MinimalLogger.py 1.8 => 1.9 ===
     def initialize(self):
         global _log_dest, _log_level
+        eget = os.environ.get
 
-        path = os.environ.get('STUPID_LOG_FILE', None)
+        # EVENT_LOG_FILE is the preferred envvar, but we accept
+        # STUPID_LOG_FILE also
+        path = eget('EVENT_LOG_FILE') or eget('STUPID_LOG_FILE')
         if path is None:
             _log_dest = None
         else:
@@ -64,7 +67,9 @@
             else:
                 _log_dest = sys.stderr
 
-        severity = os.environ.get('STUPID_LOG_SEVERITY', None)
+        # EVENT_LOG_SEVERITY is the preferred envvar, but we accept
+        # STUPID_LOG_SEVERITY also
+        severity = eget('EVENT_LOG_SEVERITY') or eget('STUPID_LOG_SEVERITY')
         if severity:
             _log_level = int(severity)
         else:


=== Zope/lib/python/zLOG/__init__.py 1.5 => 1.6 ===
 log-rotation facility. 
 
-There is a default stupid logging facility that:
+There is a default event logging facility that:
 
   - swallows logging information by default,
 
   - outputs to sys.stderr if the environment variable
-    STUPID_LOG_FILE is set to an empty string, and
+    EVENT_LOG_FILE is set to an empty string, and
 
   - outputs to file if the environment variable
-    STUPID_LOG_FILE is set to a file name.
+    EVENT_LOG_FILE is set to a file name.
 
   - Ignores errors that have a severity < 0 by default. This
-    can be overridden with the environment variable STUPID_LOG_SEVERITY
+    can be overridden with the environment variable EVENT_LOG_SEVERITY
 
 """
 __version__='$Revision$'[11:-2]