From b59c540766e154cd708e7b342d1a7983c71d69ad Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 9 Jul 2014 10:24:28 -0700 Subject: [PATCH] swc-windows-installer.py: Set default logging level to INFO And add the other levels as --verbose choices, even though we currently only use LOG.info and LOG.debug. Many *nix commands are silent by default and have options for increasing the verbosity, but Ethan points out that we should probably default to the setting that makes the most sense for new users. --- swc-windows-installer.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/swc-windows-installer.py b/swc-windows-installer.py index e227c70..769da4a 100755 --- a/swc-windows-installer.py +++ b/swc-windows-installer.py @@ -43,7 +43,7 @@ import zipfile LOG = logging.getLogger('swc-windows-installer') LOG.addHandler(logging.StreamHandler()) -LOG.setLevel(logging.ERROR) +LOG.setLevel(logging.INFO) if sys.version_info >= (3, 0): # Python 3 @@ -274,8 +274,10 @@ if __name__ == '__main__': description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) parser.add_argument( - '-v', '--verbose', choices=['info', 'debug'], - help='Verbosity') + '-v', '--verbose', + choices=['critical', 'error', 'warning', 'info', 'debug'], + help='Verbosity (defaults to {!r})'.format( + logging.getLevelName(LOG.level).lower())) args = parser.parse_args() -- 2.26.2