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

Unified Diff: build/android/pylib/local/device/local_device_environment.py

Issue 2163833003: Logdog for logcats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update chromium.android.json Created 4 years, 4 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
Index: build/android/pylib/local/device/local_device_environment.py
diff --git a/build/android/pylib/local/device/local_device_environment.py b/build/android/pylib/local/device/local_device_environment.py
index 431614377efa68bd4cffecc6158f13d0d6673965..1d7c2a672ff374be1374adbb840d2a460a23fde9 100644
--- a/build/android/pylib/local/device/local_device_environment.py
+++ b/build/android/pylib/local/device/local_device_environment.py
@@ -3,12 +3,14 @@
# found in the LICENSE file.
import datetime
+import fileinput
import functools
import logging
import os
import shutil
import tempfile
import threading
+import sys
from devil import base_error
from devil.android import device_blacklist
@@ -188,6 +190,8 @@ class LocalDeviceEnvironment(environment.Environment):
try:
m.Stop()
m.Close()
+ for line in fileinput.input([m.output_file], inplace=True):
+ sys.stdout.write('Device(%s) %s' % (m.adb.GetDeviceSerial(), line))
jbudorick 2016/08/10 00:54:39 Why is this writing all logcat to stdout?
nicholaslin 2016/08/10 16:40:35 Changed.
except base_error.BaseError:
logging.exception('Failed to stop logcat monitor for %s',
m.adb.GetDeviceSerial())

Powered by Google App Engine
This is Rietveld 408576698