fix: crash-log not written on windows and add log entries to crash report

* fix: crashlog not written on windows

* feat: dump last 100 log entries to crash report
This commit is contained in:
Alex Christoffer Rasmussen
2026-01-01 14:59:21 +01:00
committed by GitHub
parent 75e77de466
commit 680273770c
2 changed files with 15 additions and 2 deletions
+11 -1
View File
@@ -53,10 +53,11 @@ class Logger {
}
}
this.addToQueue(log);
try {
socket.sendAsJson(MessageTag.Log, log);
} catch (_e) {
this.addToQueue(log);
/* Nothing to catch */
}
}
@@ -117,6 +118,15 @@ class Logger {
this.escalateErrorFn?.(text, true);
}
/**
* Dumps the last 100 log entries
*/
dump() {
const q = this.queue;
this.queue = [];
return q;
}
/**
* Shutdown logger
*/