Changeset: 947772bea81b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/947772bea81b
Modified Files:
testing/Mtest.py.in
Branch: Aug2024
Log Message:
Add a --loglevel argument to be able to set the logging level.
diffs (25 lines):
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -3577,11 +3577,21 @@ def main(argv) :
parser.add_argument('--no-html', action='store_false',
dest='produce_html', help='do not produce HTML files')
else:
parser.add_argument('--produce-html', action='store_true',
dest='produce_html', help='produce HTML files')
+ parser.add_argument('--loglevel', action='store', help='log level')
parser.add_argument('tests', nargs='*', help='The positional arguments are
either a list of one or more directories to be tested, or a single directory
followed by a list of tests within that directory.')
opts = parser.parse_args()
args = opts.tests
+ if opts.loglevel:
+ import logging
+ try:
+ level = getattr(logging, opts.loglevel.upper())
+ except:
+ print(f'unknown log level {opts.loglevel}', file=sys.stderr)
+ sys.exit(1)
+ logging.basicConfig(level=level)
+
recursive = opts.recursive
global testweb
testweb = False
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]