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

interface documentation

`class ILogObserver(Interface): (source)`

Known implementations: `twisted.internet.testing.EventLoggingObserver`, `twisted.logger.FileLogObserver`, `twisted.logger.FilteringLogObserver`, `twisted.logger.LegacyLogObserverWrapper`, `twisted.logger.LimitedHistoryLogObserver`, `twisted.logger.LogPublisher`, `twisted.logger.STDLibLogObserver`

View In Hierarchy

An observer which can handle log events.

Unlike most interfaces within Twisted, an `ILogObserver` must be thread-safe. Log observers may be called indiscriminately from many different threads, as any thread may wish to log a message at any time.

Method | `__call__` | Log an event.

def __call__(event: `LogEvent`): (source)

Log an event.

Parameters

event:`LogEvent`

A dictionary with arbitrary keys as defined by the application emitting logging events, as well as keys added by the logging system. The logging system reserves the right to set any key beginning with the prefix `"log_"`; applications should not use any key so named. Currently, the following keys are used by the logging system in some way, if they are present (they are all optional):

- `"log_format"`: a PEP-3101-style format string which draws upon the keys in the event as its values, used to format the event for human consumption.
- `"log_flattened"`: a dictionary mapping keys derived from the names and format values used in the `"log_format"` string to their values. This is used to preserve some structured information for use with `twisted.logger.extractField`.
- `"log_trace"`: A `list` designed to capture information about which `LogPublisher`s have observed the event.
- `"log_level"`: a `log level` constant, indicating the importance of and audience for this event.
- `"log_namespace"`: a namespace for the emitter of the event, given as a `str`.
- `"log_system"`: a string indicating the network event or method call which resulted in the message being logged.