code: def _startRecording(self, filename):
          
          self.setOption('_log_file_name', filename)
          self.setOption('_log_input_only', True)
          self.setOption('_log', True)
docs: Start recording the session to a file for debug purposes.