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

Glenn Linderman v+python at g.nevcal.com
Fri Dec 10 21:57:29 CET 2010


On 12/10/2010 12:49 PM, Antoine Pitrou wrote:

And yet, I have helped many people who were baffled by exactly what > Bill observed: logging.info() didn't do anything. Maybe the default > should be INFO? Funny, because displaying only errors and silencing other messages is exactly what I expected logging to do by default.

So we are slowly learning the things that should be on the first couple pages of the logging docs...

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

  2. example for multi-module, showing how a single logging destination causes logging to happen in all modules, at the same level (if that is the case, which I hope it is).

  3. Maybe a small discussion of log formatting should be next? So the user realizes he shouldn't do the message formatting himself?

  4. Then rotating logs for long-running programs.

And then the rest of the more feature-filled stuff. I agree logging needs to be full-featured, but many of the features are only necessary in complex environments, and simple stuff should be simple, if it can be, and those cases explained first. Hopefully a useful subset for simple cases can be described in 1-3 pages, and then the complex features after that. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20101210/f84839b7/attachment.html>



More information about the Python-Dev mailing list