This commit is contained in:
2025-05-05 18:21:22 +02:00
parent 67a1c39d7e
commit 0ab9d1baed

View File

@@ -32,6 +32,11 @@ VERSION = "1.0.37"
curos = platform.system()
host = platform.node().lower().replace(".home.lan","")
if curos == "Windows":
log_path = "c:\\Program Files\\jaydee\\jaydee.log"
else:
log_path = "/tmp/mqtt_srv.log"
def writeLog(msg, svr="INFO"):
ts = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
ts2 = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
@@ -83,10 +88,6 @@ def uptime():
return string;
ts = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
ts2 = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
if curos == "Windows":
log_path = "c:\\Program Files\\jaydee\\jaydee.log"
else:
log_path = "/tmp/mqtt_srv.log"
if os.path.exists(log_path):
shutil.move(log_path, log_path + "." + ts2)