mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-13 03:13:47 +00:00
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:
committed by
GitHub
parent
75e77de466
commit
680273770c
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user