Bug 1509614 - Downgrade the loglevel for the `get_process_list()` messages in mozbase r=bc
authorWes Kocher <wkocher@mozilla.com>
Sat, 24 Nov 2018 23:03:49 +0000
changeset 507149 5120b8ce3de84ec0e94ed9ebe949f1245f4c9472
parent 507148 7d894090b1aaa917904f8f36caf6ef01a4949f45
child 507152 c48931864919067283a60b9627690d356058161c
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbc
bugs1509614
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1509614 - Downgrade the loglevel for the `get_process_list()` messages in mozbase r=bc `get_process_list()` makes multiple attempts at setting up adb, but errors setting up the connection get logged with a loglevel of ERROR. This patch makes these messages print with a loglevel of INFO unless this is the final attempt. This will cut down on superfluous error messages appearing in Treeherder's logviewer, while still providing all of the info fennec/tooling developers would need to fix the underlying problem here. Differential Revision: https://phabricator.services.mozilla.com/D12813
testing/mozbase/mozdevice/mozdevice/adb.py
--- a/testing/mozbase/mozdevice/mozdevice/adb.py
+++ b/testing/mozbase/mozdevice/mozdevice/adb.py
@@ -2259,18 +2259,20 @@ class ADBDevice(ADBCommand):
                 for i in range(len(els)):
                     item = els[i].lower()
                     if item == 'user':
                         user_i = i
                     elif item == 'pid':
                         pid_i = i
                 if user_i != -1 and pid_i != -1:
                     break
-                self._logger.error('get_process_list: %s' % header)
-                if attempt >= max_attempts:
+                # if this isn't the final attempt, don't print this as an error
+                if attempt < max_attempts:
+                    self._logger.info('get_process_list: attempt: %d %s' % (attempt, header))
+                else:
                     raise ADBError('get_process_list: Unknown format: %s: %s' % (
                         header, adb_process))
             ret = []
             line = adb_process.stdout_file.readline()
             while line:
                 els = line.split()
                 try:
                     ret.append([int(els[pid_i]), els[-1], els[user_i]])