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

Unified Diff: devil/devil/android/tools/device_recovery.py

Issue 2972253002: [devil] Extract logging common behavior to its own module. (Closed)
Patch Set: mikecase comments and rebase Created 3 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
« no previous file with comments | « devil/devil/android/tools/cpufreq.py ('k') | devil/devil/android/tools/device_status.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: devil/devil/android/tools/device_recovery.py
diff --git a/devil/devil/android/tools/device_recovery.py b/devil/devil/android/tools/device_recovery.py
index 718a4968293b9bc2112733235d5320a5549231f8..d6f6463663c007772b20c43a619a52da1f8d5993 100755
--- a/devil/devil/android/tools/device_recovery.py
+++ b/devil/devil/android/tools/device_recovery.py
@@ -21,10 +21,10 @@ from devil.android import device_errors
from devil.android import device_utils
from devil.android.tools import device_status
from devil.android.tools import script_common
+from devil.utils import logging_common
from devil.utils import lsusb
# TODO(jbudorick): Resolve this after experimenting w/ disabling the USB reset.
from devil.utils import reset_usb # pylint: disable=unused-import
-from devil.utils import run_tests_helper
logger = logging.getLogger(__name__)
@@ -174,6 +174,7 @@ def RecoverDevices(devices, blacklist, enable_usb_reset=False):
def main():
parser = argparse.ArgumentParser()
+ logging_common.AddLoggingArguments(parser)
script_common.AddEnvironmentArguments(parser)
parser.add_argument('--blacklist-file', help='Device blacklist JSON file.')
parser.add_argument('--known-devices-file', action='append', default=[],
@@ -181,11 +182,9 @@ def main():
help='Path to known device lists.')
parser.add_argument('--enable-usb-reset', action='store_true',
help='Reset USB if necessary.')
- parser.add_argument('-v', '--verbose', action='count', default=1,
- help='Log more information.')
args = parser.parse_args()
- run_tests_helper.SetLogLevel(args.verbose)
+ logging_common.InitializeLogging(args)
script_common.InitializeEnvironment(args)
blacklist = (device_blacklist.Blacklist(args.blacklist_file)
« no previous file with comments | « devil/devil/android/tools/cpufreq.py ('k') | devil/devil/android/tools/device_status.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698