[Python-Dev] Using logging in the stdlib and its unit tests (original) (raw)

Nick Coghlan ncoghlan at gmail.com
Sat Dec 11 11:51:53 CET 2010


On Sat, Dec 11, 2010 at 7:28 PM, Vinay Sajip <vinay_sajip at yahoo.co.uk> wrote:

Nick Coghlan <ncoghlan gmail.com> writes: Actually if we're to change things to print INFO to stdout and WARNING+ to stderr,

I suspect our messages crossed paths in mid-stream, but I actually realised I was wrong on that front - the behaviour already provided by logging.basicConfig is the better way to go. The missing piece in the story of "how do I create X kind of output" is plain old vanilla print statements and similar direct writes to sys.stdout. The logging module is a tool to track what is happening in a program, not a tool for providing a console based UI.

Cheers, Nick.

-- Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-Dev mailing list