Improve Discord logging for errors and further fix UEFI mount robustness

This commit is contained in:
2026-02-09 17:41:12 +01:00
parent 0ec7de3937
commit 5abba6ce88
2 changed files with 27 additions and 5 deletions

View File

@@ -34,6 +34,14 @@ def log_to_discord(level: str, message: str, module: str = "general"):
with QUEUE_LOCK:
FULL_LOG.append(log_entry)
# If it's an error, try to send it immediately as a message too
if level.upper() in ["ERROR", "CRITICAL"]:
threading.Thread(
target=send_discord_message,
args=(f"**[{level.upper()}] [{module}]** {message[:1900]}",),
daemon=True
).start()
def flush_logs():