create logs folder

main
vitrinekast 8 months ago
parent 072ad8a1ab
commit f42e7e6087

@ -4,9 +4,13 @@ from datetime import datetime, timedelta
import os import os
import fnmatch import fnmatch
#create the log directory
path = "./logs"
if not os.path.exists(path):
os.makedirs(path)
# TODO: check sorting of these files (should be chronological) # TODO: check sorting of these files (should be chronological)
# Getting the dynamic variables # Getting the dynamic variables
log_files = fnmatch.filter(os.listdir("./logs"), '*.html') log_files = fnmatch.filter(os.listdir(path), '*.html')
now = datetime.today() now = datetime.today()
next_report = now + timedelta(hours=3) next_report = now + timedelta(hours=3)
log_file_name = "log_" + now.strftime("%Y-%m-%d_%H:%M:%S") + ".html" log_file_name = "log_" + now.strftime("%Y-%m-%d_%H:%M:%S") + ".html"

Loading…
Cancel
Save