parameters: (self)
docstring: Starts recording logcat to file.
  
      Function spawns a thread that records logcat to file and will not die
      until |StopRecording| is called.
docstring_summary: Starts recording logcat to file.
docstring_tokens: Starts recording logcat to file .
function: def _StartRecording(self):
      """Starts recording logcat to file.
  
      Function spawns a thread that records logcat to file and will not die
      until |StopRecording| is called.
      """
      def record_to_file():
        # Write the log with line buffering so the consumer sees each individual
        # line.
        for data in self._adb.Logcat(filter_specs=self._filter_specs,
                                     logcat_format='threadtime',
                                     iter_timeout=self._RECORD_ITER_TIMEOUT):
          if self._stop_recording_event.isSet():
            return
  
          if data is None:
            # Logcat can yield None if the iter_timeout is hit.
            continue
  
          with self._record_file_lock:
            if self._record_file and not self._record_file.closed:
              self._record_file.write(data + '\n')
  
      self._stop_recording_event.clear()
      if not self._record_thread:
        self._record_thread = reraiser_thread.ReraiserThread(record_to_file)
        self._record_thread.start()
function_tokens: def _StartRecording ( self ) : def record_to_file ( ) : # Write the log with line buffering so the consumer sees each individual # line. for data in self . _adb . Logcat ( filter_specs = self . _filter_specs , logcat_format = 'threadtime' , iter_timeout = self . _RECORD_ITER_TIMEOUT ) : if self . _stop_recording_event . isSet ( ) : return if data is None : # Logcat can yield None if the iter_timeout is hit. continue with self . _record_file_lock : if self . _record_file and not self . _record_file . closed : self . _record_file . write ( data + '\n' ) self . _stop_recording_event . clear ( ) if not self . _record_thread : self . _record_thread = reraiser_thread . ReraiserThread ( record_to_file ) self . _record_thread . start ( )