hashed logging k8s
parent
368f63e404
commit
6bd6fddf40
|
@ -3957,18 +3957,21 @@ class KubernetesTaskRunner {
|
|||
let logs;
|
||||
const callback = (outputChunk) => {
|
||||
output += outputChunk;
|
||||
// split output chunk and handle per line
|
||||
for (const chunk of outputChunk.split(`\n`)) {
|
||||
// check if log start included in logs if so log a message
|
||||
if (outputChunk.includes(`Collected Logs`)) {
|
||||
if (chunk.includes(`Collected Logs`)) {
|
||||
cloud_runner_logger_1.default.log(`Log Start found in logs`);
|
||||
}
|
||||
if (outputChunk.includes(`LOGHASH:`)) {
|
||||
remote_client_logger_1.RemoteClientLogger.HandleLogChunkLine(outputChunk);
|
||||
if (chunk.includes(`LOGHASH:`)) {
|
||||
remote_client_logger_1.RemoteClientLogger.HandleLogChunkLine(chunk);
|
||||
cloud_runner_logger_1.default.log(`Loghash found`);
|
||||
}
|
||||
if (outputChunk.includes(`LOGS:`)) {
|
||||
const result = remote_client_logger_1.RemoteClientLogger.HandleLogChunkLine(outputChunk);
|
||||
if (chunk.includes(`LOGS:`)) {
|
||||
const result = remote_client_logger_1.RemoteClientLogger.HandleLogChunkLine(chunk);
|
||||
cloud_runner_logger_1.default.log(`Logs found HandleLogChunkLineResult:${result}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
try {
|
||||
logs = await cloud_runner_system_1.CloudRunnerSystem.Run(`kubectl logs ${podName}${extraFlags}`, false, true, callback);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -36,18 +36,21 @@ class KubernetesTaskRunner {
|
|||
const callback = (outputChunk: string) => {
|
||||
output += outputChunk;
|
||||
|
||||
// split output chunk and handle per line
|
||||
for (const chunk of outputChunk.split(`\n`)) {
|
||||
// check if log start included in logs if so log a message
|
||||
if (outputChunk.includes(`Collected Logs`)) {
|
||||
if (chunk.includes(`Collected Logs`)) {
|
||||
CloudRunnerLogger.log(`Log Start found in logs`);
|
||||
}
|
||||
if (outputChunk.includes(`LOGHASH:`)) {
|
||||
RemoteClientLogger.HandleLogChunkLine(outputChunk);
|
||||
if (chunk.includes(`LOGHASH:`)) {
|
||||
RemoteClientLogger.HandleLogChunkLine(chunk);
|
||||
CloudRunnerLogger.log(`Loghash found`);
|
||||
}
|
||||
if (outputChunk.includes(`LOGS:`)) {
|
||||
const result = RemoteClientLogger.HandleLogChunkLine(outputChunk);
|
||||
if (chunk.includes(`LOGS:`)) {
|
||||
const result = RemoteClientLogger.HandleLogChunkLine(chunk);
|
||||
CloudRunnerLogger.log(`Logs found HandleLogChunkLineResult:${result}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
try {
|
||||
logs = await CloudRunnerSystem.Run(`kubectl logs ${podName}${extraFlags}`, false, true, callback);
|
||||
|
|
Loading…
Reference in New Issue