Skip to content

Commit

Permalink
Revert "Try to infer a more concrete crash message from client logs (#…
Browse files Browse the repository at this point in the history
…1233)" (#1234)

This reverts commit 209dead.
  • Loading branch information
testforstephen authored Sep 12, 2023
1 parent 209dead commit d5ed5e2
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/daemon/clientLog/logWatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,6 @@ export class ClientLogWatcher {

const crashLog = logs.find(log => log.message?.startsWith("The Language Support for Java server crashed and will restart."));
info.crash = crashLog ? "true" : undefined;
// try to infer a more concrete crash error message
if (crashLog) {
let message = "";
for (let i = 0; i < logs.length - 1; i++) {
if (Date.parse(log.timestamp) < this.logProcessedTimestamp) {
break;
}
if (logs[i].message?.startsWith("The Language Support for Java server crashed and will restart.")) {
const nextLog = logs[i + 1];
if (nextLog?.level === "info" && nextLog?.message && !nextLog.message?.startsWith("[")
&& (!message || nextLog.message.length > message.length)) {
message = nextLog.message;
}
}
}
info.message = message;
}

sendInfo("", {
name: "client-log-startup-metadata",
Expand Down

0 comments on commit d5ed5e2

Please sign in to comment.