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`.`python`.`log`.`FileLogObserver``

class documentation

`class FileLogObserver(_GlobalStartStopObserver): (source)`

View In Hierarchy

Log observer that writes to a file-like object.

Method | `__init__` | Undocumented
Method | `emit` | Format the given log event as text and write it to the output file.
Method | `formatTime` | Format the given UTC value as a string representing that time in the local timezone.
Method | `getTimezoneOffset` | Return the current local timezone offset from UTC.
Instance Variable | `flush` | Undocumented
Instance Variable | `timeFormat` | If not `None`, the format string passed to strftime().
Instance Variable | `write` | Undocumented

Inherited from `_GlobalStartStopObserver`:

Method | `start` | Start observing log events.
Method | `stop` | Stop observing log events.

def __init__(self, f): (source)

Undocumented

def emit(self, eventDict): (source)
overrides `twisted.python.log._GlobalStartStopObserver.emit`

Format the given log event as text and write it to the output file.

Parameters
eventDict:`EventDict` | a log event

def formatTime(self, when): (source)

Format the given UTC value as a string representing that time in the local timezone.

By default it's formatted as an ISO8601-like string (ISO8601 date and ISO8601 time separated by a space). It can be customized using the `timeFormat` attribute, which will be used as input for the underlying `datetime.datetime.strftime` call.

Parameters
when:`int` | POSIX (ie, UTC) timestamp for which to find the offset.
Returns
`str` | Undocumented

def getTimezoneOffset(self, when): (source)

Return the current local timezone offset from UTC.

Parameters
when:`int` | POSIX (ie, UTC) timestamp for which to find the offset.
Returns
`int` | The number of seconds offset from UTC. West is positive, east is negative.

flush = (source)

Undocumented

timeFormat: `str` or `None` = (source)

If not `None`, the format string passed to strftime().

write = (source)

Undocumented