9 lines
289 B
Python
9 lines
289 B
Python
import time
|
|
|
|
|
|
def logwriter(val, logpath, warn):
|
|
with open(logpath, "a") as logfile:
|
|
if not warn:
|
|
logfile.write("{}: Value was {}\n".format(time.time(), val))
|
|
else:
|
|
logfile.write("{}: WARNING! Value was {}, too high\n".format(time.time(), val))
|