From dce20d9102bb15adb3b62a75a2bbb573270ee7d0 Mon Sep 17 00:00:00 2001 From: Kevin DeJong Date: Mon, 8 Jul 2024 12:13:53 -0700 Subject: [PATCH] Update logging configuration to not when used by a library --- src/cfnlint/config.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/cfnlint/config.py b/src/cfnlint/config.py index 5ecee1ec2b..5f24321eb6 100644 --- a/src/cfnlint/config.py +++ b/src/cfnlint/config.py @@ -37,15 +37,12 @@ def configure_logging(debug_logging, info_logging): elif info_logging: LOGGER.setLevel(logging.INFO) else: - LOGGER.setLevel(logging.NOTSET) + LOGGER.setLevel(logging.WARNING) log_formatter = logging.Formatter( "%(asctime)s - %(name)s - %(levelname)s - %(message)s" ) ch.setFormatter(log_formatter) - # make sure all other log handlers are removed before adding it back - for handler in LOGGER.handlers: - LOGGER.removeHandler(handler) LOGGER.addHandler(ch)