Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`logger`.`_json``

module documentation
(source)

Tools for saving and loading log events in a structured format.

Function | `failureAsJSON` | Convert a failure to a JSON-serializable data structure.
Function | `failureFromJSON` | Load a `Failure` from a dictionary deserialized from JSON.
Function | `objectLoadHook` | Dictionary-to-object-translation hook for certain value types used within the logging system.
Function | `objectSaveHook` | Object-to-serializable hook for certain value types used within the logging system.
Type Alias | `JSONDict` | Undocumented
Variable | `classInfo` | Undocumented
Variable | `log` | Undocumented
Variable | `uuidToLoader` | Undocumented

def failureAsJSON(failure): (source)

Convert a failure to a JSON-serializable data structure.

Parameters
failure:`Failure` | A failure to serialize.
Returns
`JSONDict` | a mapping of strings to ... stuff, mostly reminiscent of `Failure.__getstate__`

def failureFromJSON(failureDict): (source)

Load a `Failure` from a dictionary deserialized from JSON.

Parameters
failureDict:`JSONDict` | a JSON-deserialized object like one previously returned by `failureAsJSON`.
Returns
`Failure` | `Failure`

def objectLoadHook(aDict): (source)

Dictionary-to-object-translation hook for certain value types used within the logging system.

Parameters
aDict:`JSONDict` | A dictionary loaded from a JSON object.
Returns
`object` | `aDict` itself, or the object represented by `aDict`
See Also
the `object_hook` parameter to `json.load`

def objectSaveHook(pythonObject): (source)

Object-to-serializable hook for certain value types used within the logging system.

Parameters
pythonObject:`object` | Any object.
Returns
`JSONDict` | If the object is one of the special types the logging system supports, a specially-formatted dictionary; otherwise, a marker dictionary indicating that it could not be serialized.
See Also
the `default` parameter to `json.dump`

JSONDict = (source)

Undocumented

Value

    Dict[str, Any]

classInfo = (source)

Undocumented

log = (source)

Undocumented

uuidToLoader = (source)

Undocumented