class documentation

class twisted.scripts._twistd_unix.UnixAppLogger(app.AppLogger): (source)

View In Hierarchy

A logger able to log to syslog, to files, and to stdout.

Method __init__ Initialize an AppLogger with a ServerOptions.
Instance Variable _syslog A flag indicating whether to use syslog instead of file logging.
Instance Variable _syslogPrefix If sysLog is True, the string prefix to use for syslog messages.
Instance Variable _nodaemon A flag indicating the process will not be daemonizing.
Method _getLogObserver Create and return a suitable log observer for the given configuration.
Instance Variable _logfilename Undocumented

Inherited from AppLogger:

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 _observerFactory Callable object that will create a log observer, or None.
Instance Variable _observer log observer added at start and removed at stop.
Method _initialLog Print twistd start log message.
_syslog = (source)
A flag indicating whether to use syslog instead of file logging.
(type: bool)
_syslogPrefix = (source)
If sysLog is True, the string prefix to use for syslog messages.
(type: str)
_nodaemon = (source)
A flag indicating the process will not be daemonizing.
(type: bool)
def __init__(self, options): (source)
def _getLogObserver(self): (source)

Create and return a suitable log observer for the given configuration.

The observer will go to syslog using the prefix _syslogPrefix if _syslog is true. Otherwise, it will go to the file named _logfilename or, if _nodaemon is true and _logfilename is "-", to stdout.

ReturnsAn object suitable to be passed to log.addObserver.
_logfilename = (source)

Undocumented

(type: str)
API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.