Skip to content

Commit

Permalink
Don't break log parsing when Prosperity adds debug data to it
Browse files Browse the repository at this point in the history
  • Loading branch information
jmerle committed Apr 4, 2024
1 parent 5434d07 commit 71c1f94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/algorithm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,11 @@ function getAlgorithmData(logLines: string[]): AlgorithmDataRow[] {
continue;
}

const start = lambdaLogPrefix.length;
const start = line.indexOf('[[');
const end = line.lastIndexOf(']') + 1;

try {
const compressedDataRow = JSON.parse(JSON.parse(line.substring(start, end) + '"'));
const compressedDataRow = JSON.parse(JSON.parse('"' + line.substring(start, end) + '"'));
rows.push(decompressDataRow(compressedDataRow, nextSandboxLogs));
} catch (err) {
console.log(line);
Expand Down

0 comments on commit 71c1f94

Please sign in to comment.