twisted.logger.eventAsJSON(event)
function documentationtwisted.logger
View Source
Encode an event as JSON, flattening it if necessary to preserve as much structure as possible.
Not all structure from the log event will be preserved when it is serialized.
Parameters | event | A log event dictionary. (type: dict with arbitrary keys and values) |
Returns | A string of the serialized JSON; note that this will contain no newline characters, and may thus safely be stored in a line-delimited file. (type: unicode ) |
Function | default | Serialize an object not otherwise serializable by dumps . |
Serialize an object not otherwise serializable by dumps
.
Parameters | unencodable | An unencodable object. |
Returns | unencodable , serialized |