[Twisted-Python] Logging Framework

Juergen Hermann j.her at t-online.de
Wed Aug 22 12:39:07 MDT 2001


On Wed, 22 Aug 2001 00:33:59 +0300 (IDT), Moshe Zadka wrote:

>twisted.python.log:
>
>DEBUG, WARNING, NORMAL, IMPORTANT, CRITICAL = range(5)
>priorities = 'DEBUG', 'WARNING', 'NORMAL', 'IMPORTANT', 'CRITICAL'

INFO - ignorable
DEBUG - only important to programmers
WARNING - MIGHT be bad
ERROR - IS bad, but can work around it
FATAL - unrecoverable, must kill myself

Don't have too much time, but the main prob in the class hierarchy is
that you mix event formatting and event sinks ==> you need a pluggable
LogFormatter. And consider log filtering to several sinks (all events
to a file, AND all >= ERROR to syslog).

Another very useful addition is log contexts (a pattern, I think
they're in PLoP3).

We have a similar log system in C++ with a Py/C binding, can tell you
more if you want.
Ciao, Jürgen







More information about the Twisted-Python mailing list