From: W. Trevor King Date: Wed, 9 Jul 2014 17:24:28 +0000 (-0700) Subject: swc-windows-installer.py: Set default logging level to INFO X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b59c540766e154cd708e7b342d1a7983c71d69ad;p=swc-workshop.git 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. --- 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()