Bug 1085318 - [mozdevice] Change the log level within DeviceManagerADB.getInfo to DEBUG. r=wlachance
authorDave Hunt <dhunt@mozilla.com>
Mon, 20 Oct 2014 05:05:00 +0200
changeset 237817 bee3a048500bf6c83d1fd95b4af89a6b62fb3897
parent 237816 75e8a2121a08c629fc77799d71532d870d1cac67
child 237818 0f92f54185d98226269e36721ab5cc24e39e401e
push id660
push userraliiev@mozilla.com
push dateWed, 18 Feb 2015 20:30:48 +0000
treeherdermozilla-release@49e493494178 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswlachance
bugs1085318
milestone36.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 1085318 - [mozdevice] Change the log level within DeviceManagerADB.getInfo to DEBUG. r=wlachance
testing/mozbase/mozdevice/mozdevice/devicemanagerADB.py
testing/mozbase/mozdevice/mozdevice/dmcli.py
--- a/testing/mozbase/mozdevice/mozdevice/devicemanagerADB.py
+++ b/testing/mozbase/mozdevice/mozdevice/devicemanagerADB.py
@@ -517,17 +517,17 @@ class DeviceManagerADB(DeviceManager):
         if directive == "systime" or directive == "all":
             ret["systime"] = self.shellCheckOutput(["date"])
         if directive == "memtotal" or directive == "all":
             meminfo = {}
             for line in self.pullFile("/proc/meminfo").splitlines():
                 key, value = line.split(":")
                 meminfo[key] = value.strip()
             ret["memtotal"] = meminfo["MemTotal"]
-        self._logger.info(ret)
+        self._logger.debug("getInfo: %s" % ret)
         return ret
 
     def uninstallApp(self, appName, installPath=None):
         status = self._runCmd(["uninstall", appName]).output[0].strip()
         if status != 'Success':
             raise DMError("uninstall failed for %s. Got: %s" % (appName, status))
 
     def uninstallAppAndReboot(self, appName, installPath=None):
--- a/testing/mozbase/mozdevice/mozdevice/dmcli.py
+++ b/testing/mozbase/mozdevice/mozdevice/dmcli.py
@@ -129,20 +129,24 @@ class DMCli(object):
                                      'args': [ { 'name': 'interface', 'nargs': '*' } ],
                                      'help': 'get the ip address of the device'
                                    }
                           }
 
         self.parser = argparse.ArgumentParser()
         self.add_options(self.parser)
         self.add_commands(self.parser)
+        mozlog.structured.commandline.add_logging_group(self.parser)
 
     def run(self, args=sys.argv[1:]):
         args = self.parser.parse_args()
 
+        mozlog.structured.commandline.setup_logging(
+            'mozdevice', args, {'mach': sys.stdout})
+
         if args.dmtype == "sut" and not args.host and not args.hwid:
             self.parser.error("Must specify device ip in TEST_DEVICE or "
                               "with --host option with SUT")
 
         self.dm = self.getDevice(dmtype=args.dmtype, hwid=args.hwid,
                                  host=args.host, port=args.port,
                                  verbose=args.verbose)