mirror of
https://github.com/ARM-software/devlib.git
synced 2025-09-03 02:21:54 +01:00
LogcatCollector: Learn to pass format to logcat
logcat -v lets you specify the format for the logcat output. Add a parameter to the LogcatCollector to allow us to pass that information down to the logcat invocation.
This commit is contained in:
committed by
Marc Bonnici
parent
07cad78046
commit
569e4bd057
@@ -22,9 +22,10 @@ from devlib.utils.android import LogcatMonitor
|
||||
|
||||
class LogcatCollector(CollectorBase):
|
||||
|
||||
def __init__(self, target, regexps=None):
|
||||
def __init__(self, target, regexps=None, logcat_format=None):
|
||||
super(LogcatCollector, self).__init__(target)
|
||||
self.regexps = regexps
|
||||
self.logcat_format = logcat_format
|
||||
self.output_path = None
|
||||
self._collecting = False
|
||||
self._prev_log = None
|
||||
@@ -49,7 +50,7 @@ class LogcatCollector(CollectorBase):
|
||||
"""
|
||||
if self.output_path is None:
|
||||
raise RuntimeError("Output path was not set.")
|
||||
self._monitor = LogcatMonitor(self.target, self.regexps)
|
||||
self._monitor = LogcatMonitor(self.target, self.regexps, logcat_format=self.logcat_format)
|
||||
if self._prev_log:
|
||||
# Append new data collection to previous collection
|
||||
self._monitor.start(self._prev_log)
|
||||
|
Reference in New Issue
Block a user