ANN: Logging Package v0.4.9.4 released
Michael Hoffman
m.h.3.9.1.without.dots.at.cam.ac.uk at example.com
Sun Sep 26 08:11:07 EDT 2004
Vinay Sajip wrote:
> What exactly is hard to use? An example of the minimalist way of
> logging:
>
> import logging
>
> logging.warn("This is your %s warning", "first")
> #similarly you can call logging.debug(), logging.info() etc.
Wow. I never realized you could do that. Apparently I'm not the only one.
I think it is mainly a problem with the documentation. My personal
experience: I found that on the top-level logging module documentation
there's about 2.5 pages of text that seems to go on and on in much more
detail than I wanted for a simple use case. So I look for an example.
Aha! There's a "basic example" page. But the "basic example" given in
the docs has 7 lines of setup before I can even add something to the
log. I always assumed that most of that was necessary.
I personally have found the logging module very useful when I have used
it. Now that I know how easy it is to get access to the root logger I'll
use it a lot more!
--
Michael Hoffman
More information about the Python-list
mailing list