hashed logging k8s

This commit is contained in:
Frostebite 2023-09-20 21:11:36 +01:00
parent 368f63e404
commit 6bd6fddf40
3 changed files with 14 additions and 11 deletions

BIN
dist/index.js generated vendored

Binary file not shown.

BIN
dist/index.js.map generated vendored

Binary file not shown.

View File

@ -36,17 +36,20 @@ class KubernetesTaskRunner {
const callback = (outputChunk: string) => { const callback = (outputChunk: string) => {
output += outputChunk; output += outputChunk;
// check if log start included in logs if so log a message // split output chunk and handle per line
if (outputChunk.includes(`Collected Logs`)) { for (const chunk of outputChunk.split(`\n`)) {
CloudRunnerLogger.log(`Log Start found in logs`); // check if log start included in logs if so log a message
} if (chunk.includes(`Collected Logs`)) {
if (outputChunk.includes(`LOGHASH:`)) { CloudRunnerLogger.log(`Log Start found in logs`);
RemoteClientLogger.HandleLogChunkLine(outputChunk); }
CloudRunnerLogger.log(`Loghash found`); if (chunk.includes(`LOGHASH:`)) {
} RemoteClientLogger.HandleLogChunkLine(chunk);
if (outputChunk.includes(`LOGS:`)) { CloudRunnerLogger.log(`Loghash found`);
const result = RemoteClientLogger.HandleLogChunkLine(outputChunk); }
CloudRunnerLogger.log(`Logs found HandleLogChunkLineResult:${result}`); if (chunk.includes(`LOGS:`)) {
const result = RemoteClientLogger.HandleLogChunkLine(chunk);
CloudRunnerLogger.log(`Logs found HandleLogChunkLineResult:${result}`);
}
} }
}; };
try { try {