From dacc5a563f4e7c6d951002a03102921707cdb4c0 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Sat, 21 Jan 2023 15:41:39 -0700 Subject: [PATCH] Add silent option resolving #1941 --- python/ctsm/ctsm_logging.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/ctsm/ctsm_logging.py b/python/ctsm/ctsm_logging.py index ff51c6d8f2..e14ec2754c 100644 --- a/python/ctsm/ctsm_logging.py +++ b/python/ctsm/ctsm_logging.py @@ -68,6 +68,7 @@ def add_logging_args(parser): logging_level.add_argument( "-v", "--verbose", action="store_true", help="Output extra logging info" ) + logging_level.add_argument("--silent", action="store_true", help="Only output errors") logging_level.add_argument( "--debug", @@ -84,6 +85,8 @@ def process_logging_args(args): root_logger.setLevel(logging.DEBUG) elif args.verbose: root_logger.setLevel(logging.INFO) + elif args.silent: + root_logger.setLevel(logging.ERROR) else: root_logger.setLevel(logging.WARNING)