Part of udplog.udplog View Source View In Hierarchy
Dispatcher of structured log events over UDP.
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 92 | Method | __init__ | Undocumented |
| 100 | Method | augment | Augment the event dictionary with timestamp and default fields. |
| 109 | Method | serialize | Serialize a log event. |
| 126 | Method | serializeFailure | Serialize a log event for a failed attempt to send a udplog event. |
| 163 | Method | log | Log an event. |
Augment the event dictionary with timestamp and default fields.
Serialize a log event.
The dictionary is serialized to JSON. To minimize serialization
failures, for unserializable objects it falls back to the repr
of such objects.
Serialize a log event for a failed attempt to send a udplog event.
If present, this truncates the 'message' field to
MAX_TRIMMED_MESSAGE_SIZE, and preserves exception-related
fields from the original eventDict as
'original'.
Log an event.
| Parameters | category | A short string identifying the type of log event. The receiving log server
may use this to collect all messages of the same category in their own log
files. (type: bytes) |
| eventDict | The event dictionary. As this is serialized to JSON (see serialize),
for complex values, you may want to render them to a string before adding
them to the event dictionary. (type: dict) |