def InitLog():
logging.getLogger().setLevel(logging.ERROR)
RtHandler = RotatingFileHandler(filename=C_LOG_DIR, maxBytes=C_LOG_SIZE, backupCount=C_LOG_FILES)
RtHandler.setLevel(logging.ERROR)
RtHandler.setFormatter(logging.Formatter('[%(asctime)s][%(levelname)s] %(message)s'))
logging.getLogger().addHandler(RtHandler)
logging.error('??????')
# ??????
评论列表
文章目录