Bug 1041533 - Update mozdevice to not reset global log level. r=armenzg
authorWilliam Lachance <wlachance@mozilla.com>
Wed, 23 Jul 2014 10:31:43 -0400
changeset 195728 10dc968f23ea037ffc235c9a5f44d0a9c94c4c08
parent 195727 d83c2125ae04a299687f96cd0c0f61c55b596fde
child 195729 51dfe9a552e9b4aab376d73184beee1da6efdb32
push id27192
push userryanvm@gmail.com
push dateWed, 23 Jul 2014 19:18:50 +0000
treeherdermozilla-central@30907d52c4c2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersarmenzg
bugs1041533
milestone34.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 1041533 - Update mozdevice to not reset global log level. r=armenzg
testing/mozbase/mozdevice/mozdevice/devicemanager.py
--- a/testing/mozbase/mozdevice/mozdevice/devicemanager.py
+++ b/testing/mozbase/mozdevice/mozdevice/devicemanager.py
@@ -41,22 +41,23 @@ class DeviceManager(object):
     applications from the device.
 
     Never instantiate this class directly! Instead, instantiate an
     implementation of it like DeviceManagerADB or DeviceManagerSUT.
     """
 
     _logcatNeedsRoot = True
 
-    def __init__(self, logLevel=mozlog.ERROR, deviceRoot=None):
+    def __init__(self, logLevel=None, deviceRoot=None):
         try:
             self._logger = mozlog.structured.structuredlog.get_default_logger(component="mozdevice")
             if not self._logger: # no global structured logger, fall back to reg logging
                 self._logger = mozlog.getLogger("mozdevice")
-                self._logger.setLevel(logLevel)
+                if logLevel is not None:
+                    self._logger.setLevel(logLevel)
         except AttributeError:
             # Structured logging doesn't work on Python 2.6
             self._logger = None
         self._logLevel = logLevel
         self._remoteIsWin = None
         self._isDeviceRootSetup = False
         self._deviceRoot = deviceRoot