Known subclasses: twisted.scripts._twistd_unix.UnixAppLogger

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.
Instance Variable _logfilename The name of the file to which to log, if other than the default. (type: str)
Instance Variable _observerFactory Callable object that will create a log observer, or None.
Instance Variable _observer log observer added at start and removed at stop. (type: a callable that implements logger.ILogObserver or log.ILogObserver.)
Method _initialLog Print twistd start log message.
Method _getLogObserver Create a log observer to be added to the logging system before running this application.
_logfilename =
The name of the file to which to log, if other than the default. (type: str)
_observerFactory =
Callable object that will create a log observer, or None.
_observer =
log observer added at start and removed at stop. (type: a callable that implements logger.ILogObserver or log.ILogObserver.)
def __init__(self, options): (source)
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).

ParametersapplicationThe application on which to check for an logger.ILogObserver or legacy log.ILogObserver. (type: twisted.python.components.Componentized)
def _initialLog(self): (source)

Print twistd start log message.

def _getLogObserver(self): (source)

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

def stop(self): (source)

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

API Documentation for Twisted, generated by pydoctor at 2018-07-14 04:53:34.