def stop(self): """ Remove all log observers previously set up by L{AppLogger.start}. """ logger._loggerFor(self).info("Server Shut Down.") if self._observer is not None: logger.globalLogPublisher.removeObserver(self._observer) self._observer = None
def doStart(self): """Make sure startFactory is called. Users should not call this function themselves! """ if not self.numPorts: if self.noisy: _loggerFor(self).info("Starting factory {factory!r}", factory=self) self.startFactory() self.numPorts = self.numPorts + 1
def _initialLog(self): """ Print twistd start log message. """ from twisted.internet import reactor logger._loggerFor(self).info( "twistd {version} ({exe} {pyVersion}) starting up.", version=copyright.version, exe=sys.executable, pyVersion=runtime.shortPythonVersion()) logger._loggerFor(self).info('reactor class: {reactor}.', reactor=qual(reactor.__class__))
def doStart(self): """ Make sure startFactory is called. Users should not call this function themselves! """ if not self.numPorts: if self.noisy: _loggerFor(self).info("Starting factory {factory!r}", factory=self) self.startFactory() self.numPorts = self.numPorts + 1
def doStop(self): """Make sure stopFactory is called. Users should not call this function themselves! """ if self.numPorts == 0: # this shouldn't happen, but does sometimes and this is better # than blowing up in assert as we did previously. return self.numPorts = self.numPorts - 1 if not self.numPorts: if self.noisy: _loggerFor(self).info("Stopping factory {factory!r}", factory=self) self.stopFactory()
def doStop(self): """ Make sure stopFactory is called. Users should not call this function themselves! """ if self.numPorts == 0: # This shouldn't happen, but does sometimes and this is better # than blowing up in assert as we did previously. return self.numPorts = self.numPorts - 1 if not self.numPorts: if self.noisy: _loggerFor(self).info("Stopping factory {factory!r}", factory=self) self.stopFactory()