标签:turn 模块 debug ret info *args 日期格 mic file
使用python自带的logging日志模块
import logging
# 设置log级别为 info
logging.basicConfig(level=logging.INFO)
# error > debug > info
def run(*args, **kwargs):
basepage = args[0]
try:
logging.info(f"start find:{str(args)},开始找 KWARGS:{str(kwargs)}")
return fun(*args, **kwargs)
import logging
LOG_FORMAT = "%(asctime)s - %(levelname)s - %(message)s"
logging.basicConfig(filename=‘xueqiu.log‘, level=logging.INFO, format=LOG_FORMAT)
标签:turn 模块 debug ret info *args 日期格 mic file
原文地址:https://www.cnblogs.com/panda-123/p/14305592.html