Implemented logging

This commit is contained in:
R Dittberner 2026-06-04 14:40:54 +02:00
parent 3e930c04a9
commit 5a6663c369
7 changed files with 123 additions and 7 deletions

9
logger.py Normal file
View file

@ -0,0 +1,9 @@
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))