Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/95782
Change subject: make-release: basic logging support ...................................................................... make-release: basic logging support logging is a nice module to log message based on levels. This patch adds --debug, --info and --quiet matching different level of verbosity. Unused yet. Change-Id: I59159e9c5212768e8683a5bc65a963f357a811f3 --- M make-release/make-release.py 1 file changed, 17 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release refs/changes/82/95782/1 diff --git a/make-release/make-release.py b/make-release/make-release.py index 1f7aa86..5e05ba8 100755 --- a/make-release/make-release.py +++ b/make-release/make-release.py @@ -11,6 +11,7 @@ """ import argparse +import logging import os import re import subprocess @@ -103,6 +104,21 @@ help='version that came before') # Optional arguments: + + log_options = parser.add_mutually_exclusive_group() + log_options.add_argument( + '--debug', dest='log_level', + action='store_const', const=logging.DEBUG, + help='Print out internal processing') + log_options.add_argument( + '-v', '--verbose', '--info', dest='log_level', + action='store_const', const=logging.INFO, + help='Give a bit more information about what is going on') + log_options.add_argument( + '-q', '--quiet', dest='log_level', + action='store_const', const=logging.WARNING, + help='Only shows up warning and errors') + parser.add_argument( '-y', '--yes', dest='yes', action='store_true', help='answer yes to any question' @@ -603,5 +619,6 @@ if __name__ == '__main__': options = parse_args() + logging.basicConfig(level=options.log_level, stream=sys.stderr) app = MakeRelease(options) sys.exit(app.main()) -- To view, visit https://gerrit.wikimedia.org/r/95782 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I59159e9c5212768e8683a5bc65a963f357a811f3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: Hashar <has...@free.fr> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits