u.t.UDPLogObserver(object) : class documentation

Part of udplog.twisted View Source View In Hierarchy

Twisted Log Observer that emits to UDP log.

Line # Kind Name Docs
0 Instance Variable defaultCategory Defailt log category. If there is no key category in the eventDict, use this category instead.
41 Method __init__ Undocumented
46 Method emit Log an event.
110 Method start Start observing log events.
117 Method stop Stop observing log events.
defaultCategory =
Defailt log category. If there is no key category in the eventDict, use this category instead.
def __init__(self, logger, defaultCategory='udplog_unknown'): (source)
Undocumented
def emit(self, eventDict): (source)

Log an event.

This converts eventDict so that it can be serialized to JSON and sent over UDP to the logging server.

The key 'time' that is automatically provided by Twisted is renamed to 'timestamp' that is used in UDP log.

When Twisted logs an error, the associated Failure is in the eventDict with key 'failure'. For warnings, 'warning' holds the warning class and its arguments, and 'filename', 'lineno' the location where the warning was reported from. See twisted.python.log.textFromEventDict for how 'format' is used to render failures and warnings.

See twisted.python.log.ILogObserver.

def start(self): (source)

Start observing log events.

def stop(self): (source)

Stop observing log events.

API Documentation for udplog, generated by pydoctor at 2014-02-17 15:26:29.