def Stop(self): """Stops the logcat monitor. Close the logdog stream as well. """ try: super(LogdogLogcatMonitor, self)._StopRecording() if self._logdog_stream: self._logcat_url = logdog_helper.get_viewer_url(self._stream_name) self._logdog_stream.close() except Exception as e: # pylint: disable=broad-except logging.exception('Unknown Error: %s.', e)
def Stop(self): """Stops the logcat monitor. Close the logdog stream as well. """ try: super(LogdogLogcatMonitor, self)._StopRecording() if self._logdog_stream: self._logcat_url = logdog_helper.get_viewer_url(self._stream_name) self._logdog_stream.close() except Exception as e: # pylint: disable=broad-except logging.exception('Unknown Error: %s.', e)
def upload_logcats_file(): try: yield finally: if not args.logcat_output_file: logging.critical('Cannot upload logcats file. ' 'File to save logcat is not specified.') else: with open(args.logcat_output_file) as src: dst = logdog_helper.open_text('unified_logcats') if dst: shutil.copyfileobj(src, dst) dst.close() logging.critical( 'Logcat: %s', logdog_helper.get_viewer_url('unified_logcats'))
def upload_logcats_file(): try: yield finally: if not args.logcat_output_file: logging.critical('Cannot upload logcats file. ' 'File to save logcat is not specified.') else: with open(args.logcat_output_file) as src: dst = logdog_helper.open_text('unified_logcats') if dst: shutil.copyfileobj(src, dst) dst.close() logging.critical( 'Logcat: %s', logdog_helper.get_viewer_url('unified_logcats'))
def upload_logcats_file(): try: yield finally: if not args.logcat_output_file: logging.critical('Cannot upload logcat file: no file specified.') elif not os.path.exists(args.logcat_output_file): logging.critical("Cannot upload logcat file: file doesn't exist.") else: with open(args.logcat_output_file) as src: dst = logdog_helper.open_text('unified_logcats') if dst: shutil.copyfileobj(src, dst) dst.close() logging.critical( 'Logcat: %s', logdog_helper.get_viewer_url('unified_logcats'))
def upload_logcats_file(): try: yield finally: if not args.logcat_output_file: logging.critical('Cannot upload logcat file: no file specified.') elif not os.path.exists(args.logcat_output_file): logging.critical("Cannot upload logcat file: file doesn't exist.") else: with open(args.logcat_output_file) as src: dst = logdog_helper.open_text('unified_logcats') if dst: shutil.copyfileobj(src, dst) dst.close() logging.critical( 'Logcat: %s', logdog_helper.get_viewer_url('unified_logcats'))
def _Link(self): return logdog_helper.get_viewer_url(self._stream_name)
def _Link(self): return logdog_helper.get_viewer_url(self._stream_name)