generated from nathanwoodburn/python-webserver-template
feat: Remove time from logs
All checks were successful
Build Docker / BuildImage (push) Successful in 57s
All checks were successful
Build Docker / BuildImage (push) Successful in 57s
This commit is contained in:
@@ -33,7 +33,7 @@ def log(message: str):
|
||||
f.write("")
|
||||
|
||||
with open(log_path, "a") as f:
|
||||
f.write(f"{datetime.now().isoformat()} - {message}\n")
|
||||
f.write(f"{message}\n")
|
||||
print(f"{datetime.now().isoformat()} - {message}") # Also print to console for debugging
|
||||
|
||||
def find(name, path):
|
||||
@@ -112,9 +112,9 @@ def restart():
|
||||
# Start with a new process
|
||||
output = os.system(f"spotifyd -d '{SPEAKER_NAME}' --onevent {hookPath}")
|
||||
if output != 0:
|
||||
log("Failed to restart spotifyd")
|
||||
log("Failed to start spotifyd")
|
||||
else:
|
||||
log("spotifyd restarted successfully")
|
||||
log("Spotify started successfully")
|
||||
|
||||
return redirect('/')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user