def startFactory(self):
        """
        Set up request logging if necessary.
        """
        if self._logDateTimeCall is None:
            self._updateLogDateTime()

        if self.logPath:
            self.logFile = self._openLogFile(self.logPath)
        else:
            self.logFile = log.logfile

        Set up request logging if necessary.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/http.py