[Zodb-checkins] CVS: ZODB3/zLOG - datatypes.py:1.6

Guido van Rossum guido@python.org
Thu, 23 Jan 2003 11:46:00 -0500


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

Modified Files:
	datatypes.py 
Log Message:
Extend the special case for STDERR to STDOUT.  The use case for STDOUT
is piping it to a program that reads logging message from stdin.


=== ZODB3/zLOG/datatypes.py 1.5 => 1.6 ===
--- ZODB3/zLOG/datatypes.py:1.5	Wed Jan 22 15:38:13 2003
+++ ZODB3/zLOG/datatypes.py	Thu Jan 23 11:45:57 2003
@@ -86,9 +86,11 @@
         inst.setFormatter(logging.Formatter(format, dateformat))
         inst.setLevel(level)
 
+    # XXX should pick up sys.{stderr,stdout} when the factory is invoked
     if path == "STDERR":
-        # XXX should pick up sys.stderr when the factory is invoked
         return Factory('zLOG.LogHandlers.StreamHandler', callback, sys.stderr)
+    elif path == "STDOUT":
+        return Factory('zLOG.LogHandlers.StreamHandler', callback, sys.stdout)
     else:
         return Factory('zLOG.LogHandlers.FileHandler', callback, path)