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

Unified Diff: trychange.py

Issue 2654004: Add file name and line number to trychange's log output. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 10 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trychange.py
===================================================================
--- trychange.py (revision 49043)
+++ trychange.py (working copy)
@@ -603,13 +603,14 @@
if len(args) == 1 and args[0] == 'help':
parser.print_help()
+ LOG_FORMAT = '%(levelname)s %(filename)s(%(lineno)d): %(message)s'
if not swallow_exception:
if options.verbose == 0:
- logging.basicConfig(level=logging.WARNING)
+ logging.basicConfig(level=logging.WARNING, format=LOG_FORMAT)
elif options.verbose == 1:
- logging.basicConfig(level=logging.INFO)
+ logging.basicConfig(level=logging.INFO, format=LOG_FORMAT)
elif options.verbose > 1:
- logging.basicConfig(level=logging.DEBUG)
+ logging.basicConfig(level=logging.DEBUG, format=LOG_FORMAT)
logging.debug(argv)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698