On Sun, Jan 23, 2011 at 6:39 PM, Glyph Lefkowitz <gl...@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 _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python