#记录日志函数
#logfile:日志文件名称
#all_the_text:日志文件追加变量
def WriteXXLog(logfile,all_the_text):
file_object = open(logfile, 'a')
try:
file_object.write(all_the_text)
finally:
file_object.close()
def test_main():
WriteXXLog('XXlog.txt','1111111111111\r\n')
if __name__ == "__main__":
test_main()