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

Unified Diff: devil/devil/android/tools/device_status.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/device_recovery.py ('k') | devil/devil/android/tools/flash_device.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: devil/devil/android/tools/device_status.py
diff --git a/devil/devil/android/tools/device_status.py b/devil/devil/android/tools/device_status.py
index e22f61408ddcfe3722321c43770ce6211d5b3d5b..dbbf29081c04eeda070211758813efdd43b6a53b 100755
--- a/devil/devil/android/tools/device_status.py
+++ b/devil/devil/android/tools/device_status.py
@@ -24,8 +24,8 @@ from devil.android import device_utils
from devil.android.sdk import adb_wrapper
from devil.android.tools import script_common
from devil.constants import exit_codes
+from devil.utils import logging_common
from devil.utils import lsusb
-from devil.utils import run_tests_helper
logger = logging.getLogger(__name__)
@@ -238,8 +238,6 @@ def AddArguments(parser):
parser.add_argument('--buildbot-path', '-b',
default='/home/chrome-bot/.adb_device_info',
help='Absolute path to buildbot file location')
- parser.add_argument('-v', '--verbose', action='count', default=1,
- help='Log more information.')
parser.add_argument('-w', '--overwrite-known-devices-files',
action='store_true',
help='If set, overwrites known devices files wiht new '
@@ -247,11 +245,12 @@ def AddArguments(parser):
def main():
parser = argparse.ArgumentParser()
+ logging_common.AddLoggingArguments(parser)
script_common.AddEnvironmentArguments(parser)
AddArguments(parser)
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/device_recovery.py ('k') | devil/devil/android/tools/flash_device.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698