[Twisted-Python] Twisted, twistd and logging

Jean-Paul Calderone exarkun at divmod.com
Fri Jun 20 09:45:32 EDT 2008

On Fri, 20 Jun 2008 09:40:25 -0400, Itamar Shtull-Trauring <itamar at itamarst.org> wrote:
>On Fri, 2008-06-20 at 18:32 +1000, Tim Allen wrote:
>> True; if I had to make a complaint about t.p.log, it would be that this
>> system for arbitrary event-sources to communicate with arbitrary
>> event-observers needs a well-defined interface to facilitate
>> communication. Currently, the only things an event-observer can rely on
>> are the 'isError' and 'system' fields being present, and probably
>> 'message' and 'time'. Any observer winds up either depending on extra
>> fields set by a specific event-source (and hoping that no other
>> event-source happens to use the same field-names for different
>> purposes), or having to treat every event as a raw text event -
>> defeating the point of logging complicated events in the first place.
>The plan was (is) to switch to requiring a interface=IFooMessageType
>keyword. Some day :(

No changes to twisted.python.log are required for this.  Anyone can log
messages with an interface key and use that in their log observer to
unambiguously interpret the rest of the keys.

It might be nice if Twisted's own log events included an interface, but
it's not really a very big deal.


More information about the Twisted-Python mailing list