1
2
3
4
5
6
7
8
9
f = open("D:/change_audit_task/auditchange.log","a")
try:
app = daily_aduitchange()
app.audit_change()
except Exception as e:
print(datetime.now(),file=f)
print(e,file=f)
print(" ")
f.close()

其中"a"表示追加,"w"为覆盖