Commit 562d9c29 authored by Guido van Rossum's avatar Guido van Rossum

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.
parent c275cd28
......@@ -86,9 +86,11 @@ def file_handler(section):
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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment