1.把日志模块引用到自己的项目中
import logging
logging.basicConfig(
filename="access.logging.txt",
format='%(asctime)s - %(name)s - %(levelname)s -%(module)s: %(message)s',
datefmt='%Y-%m-%d %H:%M:%S %p',
level=9,
)
logging.debug('调试debug')
logging.info('消息info')
logging.warning('警告warn')
logging.error('egon提现失败')
logging.critical('严重critical')g.critical('严重critical')