[Twisted-Python] logging (was: "Injecting" ...)
glyph at divmod.com
glyph at divmod.com
Tue Aug 1 17:19:43 EDT 2006
On Tue, 01 Aug 2006 15:25:37 -0400, Duncan McGreggor <duncan.mcgreggor at gmail.com> wrote:
>glyph at divmod.com wrote:
>>- Messages posted here should also generally follow Twisted conventions,
>>unless there is a specific need not to. For example:
>> - use twisted.python.log, not python's 'logging' module.
My point here is that you should use the 'log' module *for examples sent to this list*, not necessarily in all software -- unless, of course, you're reporting something like a buggy interaction with the 'logging' module :)
>I stopped using t.p.log last year because of a common customer requirement
>for the software to support logging levels. After digging through the
>twisted archives on this topic, it appeared that there was a little
>disagreement on how to use t.p.log, some missing docs, and no way to prevent
>the logging of messages of a certain type.
>Was I wrong in this assessment?
Not necessarily. I think that logging levels are a fundamentally wrong way of organizing log information, but I admit that's a personal opinion; I don't have very sophisticated uses for textual log files. TPL isn't particularly great either, mind you, but it is unlikely that TPL will ever support half of the features that the logging module does.
TPL's documentation is certainly _terrible_, and there are a bunch of outstanding tickets related to it... it's nowhere near as well-maintained as the logging module.
>If I wasn't, I would actually be interested in fixing this problem with both
>1) an agreed upon means of supporting log levels and 2) extensive
Logging levels are not among the things that I think should be done to the log module :). Extensive documentation sure would be nice though.
>This might dovetail nicely with JP's comment of 05/31/05 in
>http://twistedmatrix.com/trac/ticket/989. And possibly some of the issues
>raised in http://twistedmatrix.com/trac/ticket/1069 .
As long as we're talking about tickets, you can read more of my ranting about the stdlib logging module on http://twistedmatrix.com/trac/ticket/307
>Shall I open a ticket?
Not for logging levels. But for any of the other stuff you mentioned, sure.
More information about the Twisted-Python