t.p.l.LogPublisher : class documentation

Part of twisted.python.log View Source View In Hierarchy

Class for singleton log message publishing.
Method __init__ Undocumented
Method addObserver Add a new observer.
Method removeObserver Remove an observer.
Method msg Log a new message.
def __init__(self): (source)
def addObserver(self, other): (source)
Add a new observer.
ParametersotherA callable object that will be called with each new log message (a dict). (type: Provider of ILogObserver )
def removeObserver(self, other): (source)
Remove an observer.
def msg(self, *message, **kw): (source)

Log a new message.

For example:

>>> log.msg('Hello, world.')
In particular, you MUST avoid the forms:

>>> log.msg(u'Hello, world.')
>>> log.msg('Hello ', 'world.')
These forms work (sometimes) by accident and will be disabled entirely in the future.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:02:37.