From b65d63daa1ccb8fdb3059bb945c670d4d5228e18 Mon Sep 17 00:00:00 2001 From: lash Date: Sat, 12 Nov 2022 09:20:46 +0000 Subject: [PATCH] Add missing log module in cli lib --- eth_monitor/cli/log.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 eth_monitor/cli/log.py diff --git a/eth_monitor/cli/log.py b/eth_monitor/cli/log.py new file mode 100644 index 0000000..4eca8a1 --- /dev/null +++ b/eth_monitor/cli/log.py @@ -0,0 +1,21 @@ +# standard imports +import logging + +# external imports +from chainlib.cli.log import process_log as base_process_log + +logging.STATETRACE = 5 + + +def process_log(args, logger): + if args.vvv: + logger.setLevel(logging.STATETRACE) + else: + logger = base_process_log(args, logger) + + logging.getLogger('chainlib.connection').setLevel(logging.WARNING) + logging.getLogger('chainlib.eth.tx').setLevel(logging.WARNING) + logging.getLogger('chainlib.eth.src').setLevel(logging.WARNING) + + return logger +