def initLog(log_path):
'''
??????????????
'''
try:
if os.path.exists(log_path)==False:
os.makedirs(log_path)
except:
etype, evalue, tracebackObj = sys.exc_info()[:3]
print("Type: " , etype)
print("Value: " , evalue)
traceback.print_tb(tracebackObj)
track_log = log_path+'/track.log'
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(filename)s[line:%(lineno)d] %(levelname)s %(message)s',
datefmt='%a, %d %b %Y %H:%M:%S',
filename=track_log,
filemode='a')
评论列表
文章目录