# Copyright 2022 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Reads log data from a device."""
import os import subprocess import sys
from contextlib import AbstractContextManager from typing import Iterable, Optional, TextIO
from common import run_continuous_ffx_command from ffx_integration import run_symbolizer
class LogManager(AbstractContextManager): """Handles opening and closing file streams for logging purposes."""
def __exit__(self, exc_type, exc_value, traceback): """Stop all active logging instances.""" for proc in self._log_procs:
proc.kill() for log in self._log_files.values():
log.close() returnFalse
Args:
log_manager: A LogManager class that manages the log file and process.
log_to_stdout: If set to True, print logs directly to stdout.
pkg_paths: Path to the packages
log_args: Arguments forwarded to `ffx log` command.
target_id: Specify a target to use. """
# Locate debug symbols for each package. for pkg_path in pkg_paths: assert os.path.isfile(pkg_path), '%s does not exist' % pkg_path
symbol_paths.append(
os.path.join(os.path.dirname(pkg_path), 'ids.txt'))
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.