PrintLog.py 296 B

123456789101112131415161718192021
  1. import time
  2. TIMESTAMP = str(int(time.time()))
  3. LOGFILE = ""
  4. def printlog(content):
  5. print(content)
  6. with open(LOGFILE, 'a+', encoding='utf-8') as f:
  7. f.write(content + '\n')
  8. pass
  9. if __name__ == "__main__":
  10. DEBUG = False
  11. printlog("test")
  12. printlog("test1")