def test_runWithLogFile(self):
        """
        It can store logs to a local file.
        """
        def cb_check_log(result):
            logContent = logPath.getContent()
            self.assertIn(b'Log opened.', logContent)

        logPath = filepath.FilePath(self.mktemp())

        d = self.execute(
            remoteCommand='echo goodbye',
            process=ConchTestOpenSSHProcess(),
            conchArgs=['--log', '--logfile', logPath.path,
                       '--host-key-algorithms', 'ssh-rsa']
            )

        d.addCallback(self.assertEqual, b'goodbye\n')
        d.addCallback(cb_check_log)
        return d

        It can store logs to a local file.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_conch.py