def _getLogObserver(self):
        """
        Create a log observer to be added to the logging system before running
        this application.
        """
        if self._logfilename == '-' or not self._logfilename:
            logFile = sys.stdout
        else:
            logFile = logfile.LogFile.fromFullPath(self._logfilename)
        return logger.textFileLogObserver(logFile)

        Create a log observer to be added to the logging system before running
        this application.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/application/app.py