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`.`trial`.`_synctest`.`_LogObserver``

class documentation

`class _LogObserver: (source)`

View In Hierarchy

Observes the Twisted logs and catches any errors.

Method | `__init__` | Undocumented
Method | `flushErrors` | Flush errors from the list of caught errors. If no arguments are specified, remove all errors. If arguments are specified, only remove errors of those types from the stored list.
Method | `getErrors` | Return a list of errors caught by this observer.
Method | `gotEvent` | The actual observer method. Called whenever a message is logged.
Method | `_add` | Undocumented
Method | `_clearIgnores` | Stop ignoring any errors we might currently be ignoring.
Method | `_ignoreErrors` | Do not store any errors with any of the given types.
Method | `_remove` | Undocumented
Instance Variable | `_added` | A `int` giving the number of times `_add` has been called less the number of times `_remove` has been called; used to only add this observer to the Twisted logging since once, regardless of the number of calls to the add method.
Instance Variable | `_errors` | A `list` of `Failure` instances which were received as error events from the Twisted logging system.
Instance Variable | `_ignored` | A `list` of exception types which will not be recorded.

def __init__(self): (source)

Undocumented

def flushErrors(self, *errorTypes): (source)

Flush errors from the list of caught errors. If no arguments are specified, remove all errors. If arguments are specified, only remove errors of those types from the stored list.

def getErrors(self): (source)

Return a list of errors caught by this observer.

def gotEvent(self, event): (source)

The actual observer method. Called whenever a message is logged.

Parameters
event | A dictionary containing the log message. Actual structure undocumented (see source for `twisted.python.log`).

def _add(self): (source)

Undocumented

def _clearIgnores(self): (source)

Stop ignoring any errors we might currently be ignoring.

def _ignoreErrors(self, *errorTypes): (source)

Do not store any errors with any of the given types.

def _remove(self): (source)

Undocumented

_added: `int` = (source)

A `int` giving the number of times `_add` has been called less the number of times `_remove` has been called; used to only add this observer to the Twisted logging since once, regardless of the number of calls to the add method.

_errors = (source)

A `list` of `Failure` instances which were received as error events from the Twisted logging system.

_ignored: `list` = (source)

A `list` of exception types which will not be recorded.