cic-internal-integration/apps/contract-migration/scripts/common/log.py

19 lines
455 B
Python
Raw Normal View History

2021-02-21 16:41:37 +01:00
# standard imports
import logging
logging.basicConfig(level=logging.WARNING)
default_mutelist = [
'urllib3',
'websockets.protocol',
'web3.RequestManager',
'web3.providers.WebsocketProvider',
'web3.providers.HTTPProvider',
]
def create(name=None, mutelist=default_mutelist):
logg = logging.getLogger(name)
for m in mutelist:
logging.getLogger(m).setLevel(logging.CRITICAL)
return logg