class documentation

class LogPublisher: (source)

Constructor: LogPublisher(*observers)

Implements interfaces: twisted.logger.ILogObserver

View In Hierarchy

ILogObserver that fans out events to other observers.

Keeps track of a set of ILogObserver objects and forwards events to each.

Method __call__ Forward events to contained observers.
Method __init__ Undocumented
Method addObserver Registers an observer with this publisher.
Method removeObserver Unregisters an observer with this publisher.
Instance Variable log Undocumented
Method _errorLoggerForObserver Create an error-logger based on this logger, which does not contain the given bad observer.
Instance Variable _observers Undocumented
def __call__(self, event: LogEvent): (source)

Forward events to contained observers.

def __init__(self, *observers: ILogObserver): (source)

Undocumented

def addObserver(self, observer: ILogObserver): (source)

Registers an observer with this publisher.

Parameters
observer:ILogObserverAn ILogObserver to add.
def removeObserver(self, observer: ILogObserver): (source)

Unregisters an observer with this publisher.

Parameters
observer:ILogObserverAn ILogObserver to remove.

Undocumented

def _errorLoggerForObserver(self, observer: ILogObserver) -> Logger: (source)

Create an error-logger based on this logger, which does not contain the given bad observer.

Parameters
observer:ILogObserverThe observer which previously had an error.
Returns
LoggerA Logger without the given observer.
_observers = (source)

Undocumented