Improve Discord logging for errors and further fix UEFI mount robustness
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user