From ede18e2a799986d2859e9276638520d9836b77c4 Mon Sep 17 00:00:00 2001 From: Marshall Hallenbeck Date: Fri, 31 Mar 2023 13:02:22 -0400 Subject: [PATCH] fix(logging): set root logger level --- cme/crackmapexec.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cme/crackmapexec.py b/cme/crackmapexec.py index 77722d2f..27dab8a5 100755 --- a/cme/crackmapexec.py +++ b/cme/crackmapexec.py @@ -76,14 +76,18 @@ async def start_run(protocol_obj, args, db, targets): def main(): first_run_setup(cme_logger) + root_logger = logging.getLogger("root") args = gen_cli_args() if args.verbose: cme_logger.logger.setLevel(logging.INFO) + root_logger.setLevel(logging.INFO) elif args.debug: cme_logger.logger.setLevel(logging.DEBUG) + root_logger.setLevel(logging.DEBUG) else: cme_logger.logger.setLevel(logging.ERROR) + root_logger.setLevel(logging.ERROR) cme_logger.debug(f"Passed args: {args}")