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`.`application`.`app`.`AppLogger``

class documentation

`class AppLogger: (source)`

Known subclasses: `twisted.scripts._twistd_unix.UnixAppLogger`

Constructor: `AppLogger(options)`

View In Hierarchy

An `AppLogger` attaches the configured log observer specified on the commandline to a `ServerOptions` object, a custom `logger.ILogObserver`, or a legacy custom {log.ILogObserver}.

Method | `__init__` | Initialize an `AppLogger` with a `ServerOptions`.
Method | `start` | Initialize the global logging system for the given application.
Method | `stop` | Remove all log observers previously set up by `AppLogger.start`.
Method | `_getLogObserver` | Create a log observer to be added to the logging system before running this application.
Method | `_initialLog` | Print twistd start log message.
Instance Variable | `_logfilename` | The name of the file to which to log, if other than the default.
Instance Variable | `_observer` | log observer added at `start` and removed at `stop`.
Instance Variable | `_observerFactory` | Callable object that will create a log observer, or None.

def __init__(self, options): (source)
overridden in `twisted.scripts._twistd_unix.UnixAppLogger`

Initialize an `AppLogger` with a `ServerOptions`.

def start(self, application): (source)

Initialize the global logging system for the given application.

If a custom logger was specified on the command line it will be used. If not, and an `logger.ILogObserver` or legacy `log.ILogObserver` component has been set on `application`, then it will be used as the log observer. Otherwise a log observer will be created based on the command line options for built-in loggers (e.g. `--logfile`).

Parameters
application:`twisted.python.components.Componentized` | The application on which to check for an `logger.ILogObserver` or legacy `log.ILogObserver`.

def stop(self): (source)

Remove all log observers previously set up by `AppLogger.start`.

def _getLogObserver(self): (source)
overridden in `twisted.scripts._twistd_unix.UnixAppLogger`

Create a log observer to be added to the logging system before running this application.

def _initialLog(self): (source)

Print twistd start log message.

_logfilename: `str` = (source)

The name of the file to which to log, if other than the default.

_observer: a callable that implements `logger.ILogObserver` or `log.ILogObserver`. = (source)

log observer added at `start` and removed at `stop`.

_observerFactory = (source)

Callable object that will create a log observer, or None.