interface documentation

class ILogObserver(Interface): (source)

View In Hierarchy

An observer which can do something with log events.

Given that most log observers are actually bound methods, it's okay to not explicitly declare provision of this interface.

Method __call__ Log an event.
def __call__(eventDict: EventDict): (source)

Log an event.

Parameters
eventDict:EventDict

A dictionary with arbitrary keys. However, these keys are often available:

  • message: A tuple of str containing messages to be logged.
  • system: A str which indicates the "system" which is generating this event.
  • isError: A bool indicating whether this event represents an error.
  • failure: A failure.Failure instance
  • why: Used as header of the traceback in case of errors.
  • format: A string format used in place of message to customize the event. The intent is for the observer to format a message by doing something like format % eventDict.