Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2639)

Unified Diff: build/android/pylib/device/adb_wrapper.py

Issue 896503002: [Android] Add LogcatMonitor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/PRESUBMIT.py ('k') | build/android/pylib/device/device_utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/device/adb_wrapper.py
diff --git a/build/android/pylib/device/adb_wrapper.py b/build/android/pylib/device/adb_wrapper.py
index 1dbb1d89a9a2a8b7d04b007b47d4c7f20845af5a..7d11671212d236fcb9a4d6a7dc738775ef93d29f 100644
--- a/build/android/pylib/device/adb_wrapper.py
+++ b/build/android/pylib/device/adb_wrapper.py
@@ -285,7 +285,8 @@ class AdbWrapper(object):
cmd, 'path does not specify an accessible directory in the device',
device_serial=self._device_serial)
- def Logcat(self, filter_spec=None, timeout=None):
+ def Logcat(self, clear=False, dump=False, filter_spec=None,
+ logcat_format=None, timeout=None):
"""Get an iterator over the logcat output.
Args:
@@ -296,6 +297,12 @@ class AdbWrapper(object):
logcat output line by line.
"""
cmd = ['logcat']
+ if clear:
+ cmd.append('-c')
+ if dump:
+ cmd.append('-d')
+ if logcat_format:
+ cmd.extend(['-v', logcat_format])
if filter_spec is not None:
cmd.append(filter_spec)
return self._IterRunDeviceAdbCmd(cmd, timeout)
« no previous file with comments | « build/android/PRESUBMIT.py ('k') | build/android/pylib/device/device_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698