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

Unified Diff: devil/devil/android/tools/screenshot.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/provision_devices.py ('k') | devil/devil/utils/logging_common.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: devil/devil/android/tools/screenshot.py
diff --git a/devil/devil/android/tools/screenshot.py b/devil/devil/android/tools/screenshot.py
index 01b56b2604b1ce38681a3ee4cbcea91140b8345b..3b3335c25615718ad859c28bdaabe28261171507 100755
--- a/devil/devil/android/tools/screenshot.py
+++ b/devil/devil/android/tools/screenshot.py
@@ -15,6 +15,7 @@ if __name__ == '__main__':
os.path.dirname(__file__), '..', '..', '..')))
from devil.android import device_utils
from devil.android.tools import script_common
+from devil.utils import logging_common
logger = logging.getLogger(__name__)
@@ -22,21 +23,17 @@ logger = logging.getLogger(__name__)
def main():
# Parse options.
parser = argparse.ArgumentParser(description=__doc__)
+ logging_common.AddLoggingArguments(parser)
script_common.AddDeviceArguments(parser)
parser.add_argument('-f', '--file', metavar='FILE',
help='Save result to file instead of generating a '
'timestamped file name.')
- parser.add_argument('-v', '--verbose', action='store_true',
- help='Verbose logging.')
parser.add_argument('host_file', nargs='?',
help='File to which the screenshot will be saved.')
args = parser.parse_args()
-
host_file = args.host_file or args.file
-
- if args.verbose:
- logging.getLogger().setLevel(logging.DEBUG)
+ logging_common.InitializeLogging(args)
devices = script_common.GetDevices(args.devices, args.blacklist_file)
« no previous file with comments | « devil/devil/android/tools/provision_devices.py ('k') | devil/devil/utils/logging_common.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698