[Twisted-Python] Names DNS Client too chatty

Jason J. W. Williams jasonjwwilliams at gmail.com
Sun Jan 23 19:21:28 MST 2011


On Sun, Jan 23, 2011 at 6:39 PM, Glyph Lefkowitz
<glyph at twistedmatrix.com> wrote:

> Yes, logging in Twisted is a bit of a mess.
> Almost all of these chatty little messages should not be logged to disk.  If
> they're logged at all, they should be logged as purely structured data for
> observers to analyze later, not as text messages to go on a log file.
> Something like this, maybe:
>     log.msg(interface=INameResolutionLogEvent, name=domain, recordType=type)
> This will allow log observers to listen for events with event['interface']
> == INameResolutionLogEvent, but won't trigger a synchronous write().
> One of my dream features for Twisted's logging system is to get ring-buffer
> logging, like Foolscap has - <http://foolscap.lothar.com/docs/logging.html>.
>  Also, to log a lot less text and a lot more structured stuff that can be
> examined later without big piles of regular expressions.  I'd be happy to
> describe this in more detail if anyone would like to try to make systematic
> improvements to our logging subsystem or Twisted's internal use of it :).
> In the meanwhile, I think it would be OK to just remove these messages
> entirely.


During dev I do like being able to see the "starting/stopping"
messages...helps you know what's going on when you're debugging.

Would it be that bad to just use a noisy check to toggle these on and
off until a better logging system is available?

-J




More information about the Twisted-Python mailing list