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`.`_legacy``

module documentation
(source)

Integration with `twisted.python.log`.

Function | `publishToNewObserver` | Publish an old-style (`twisted.python.log`) event to a new-style (`twisted.logger`) observer.

def publishToNewObserver(observer: `ILogObserver`, eventDict: `Dict[str, Any]`, textFromEventDict: `Callable[[Dict[str, Any]], Optional[str]]`): (source)

Publish an old-style (`twisted.python.log`) event to a new-style (`twisted.logger`) observer.

Parameters
observer:`ILogObserver` | A new-style observer to handle this event.
eventDict:`Dict[str, Any]` | An `old-style`, log event.
textFromEventDict:`Callable[[Dict[str, Any]], Optional[str]]` | callable that can format an old-style event as a string. Passed here rather than imported to avoid circular dependency.
Note
It's possible that a new-style event was sent to a `LegacyLogObserverWrapper`, and may now be getting sent back to a new-style observer. In this case, it's already a new-style event, adapted to also look like an old-style event, and we don't need to tweak it again to be a new-style event, hence this checks for already-defined new-style keys.