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

Bill Janssen janssen at parc.com
Fri Dec 10 22:30:11 CET 2010


Glenn Linderman <v+python at g.nevcal.com> wrote:

1) simple example for one file programs, include an example of specifying output severity threshold. I'm with Antoine here on my expectations.

Yes, once I put

logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)

in my main(), I got what I thought I'd get in the first place. All logging messages. But I can see Antoine's point: if we use this in the stdlib, you don't want that default. I think that logging events (context) have to come into this; you can't do it with just severity alone. I'd expect to have different settings, by default, for main and for http.client, for instance.

Bill



More information about the Python-Dev mailing list