Not sure I want my INFO to go to stdout, by the way. That
corresponds to "debugging print statement" behavior, but even my
"cheap logger" actually puts stuff in a file instead, and gets it
out of the way of the normal output.
I'd suggest that this be "simplified" to put all the messages in the
same (disk) file, but then I'm sure that there are other preferences
than mine... you clearly thought about what you wanted/thought would
be useful, in coming up with the above.
On 12/10/2010 9:24 PM, Nick Coghlan wrote:
This could actually make a reasonably good basic for a "task oriented"
subsection of the logging documentation. Something like:
Yep, agree. But sadly, for each point, there may be multiple
options (your StreamHandler, but I'd want a FileHandler; your
separation of messages by level, my wanting them combined; etc.)
Your comment about basicConfig setting the level on the root logger,
but not on the default handler making it useless is opaque to me,
but is there perhaps room for another basic setup API that could get
the setup code down to a line or two in simple cases? Maybe 3
parameters:
1. minimum level to be generated, which would be passed through to
the root logger and anything else defined by this basic setup API
2. whether debug and info should go to the same or different
stream/file as warn+ messages. Maybe this is a stream or filename
or None, the last implying to use the warn+ output.
3. Where to send the warn+ output.
maybe a 4. Maximum (size, count) of the round-robin log files,
assuming that either or both of 2 & 3 specify files.
Would that be a useful set of functionality to bundle? And could it
be extended, when the user wants more power, or would it have to be
replaced, because it gets in the way of the user that wants more
power?