Fix a logging todo item in AdbProxy.
Bug=29082727
Change-Id: I0c6701b7d7a3f717c2a02370ad60d8da651e7533
diff --git a/acts/framework/acts/controllers/adb.py b/acts/framework/acts/controllers/adb.py
index c6a0e96..9e12d6d 100644
--- a/acts/framework/acts/controllers/adb.py
+++ b/acts/framework/acts/controllers/adb.py
@@ -16,6 +16,7 @@
from builtins import str
+import logging
import random
import socket
import subprocess
@@ -95,13 +96,12 @@
>> adb.start_server()
>> adb.devices() # will return the console output of "adb devices".
"""
- def __init__(self, serial="", log=None):
+ def __init__(self, serial=""):
self.serial = serial
if serial:
self.adb_str = "adb -s {}".format(serial)
else:
self.adb_str = "adb"
- self.log = log
def _exec_cmd(self, cmd):
"""Executes adb commands in a new shell.
@@ -122,9 +122,7 @@
(out, err) = proc.communicate()
ret = proc.returncode
total_output = "stdout: {}, stderr: {}, ret: {}".format(out, err, ret)
- # TODO(angli): Fix this when global logger is done.
- if self.log:
- self.log.debug("{}\n{}".format(cmd, total_output))
+ logging.debug("adb cmd: %s\n%s", cmd, total_output)
if ret == 0:
return out
else: