How can I change root logger level in it's submodule
#main.py
logging.basicConfig(filename=filename,format='%(asctime)s %(levelname)s %(message)s',filemode='w')
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
After certain event I want to change all the logging to CRITICAL
sub_logger = logging.getLogger('jdm_health')
#submodule.py
if event:
logger.setLevel(logging.CRITICAL)#root logger
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…