logging timestamp fix

pull/310/head
Frostebite 2021-11-06 21:45:42 +00:00
parent 3fc2dd99ab
commit 1c232c49f5
3 changed files with 9 additions and 13 deletions

10
dist/index.js vendored
View File

@ -720,17 +720,15 @@ class AWSBuildRunner {
const json = JSON.parse(zlib.gunzipSync(Buffer.from(records.Records[index].Data, 'base64')).toString('utf8')); const json = JSON.parse(zlib.gunzipSync(Buffer.from(records.Records[index].Data, 'base64')).toString('utf8'));
if (json.messageType === 'DATA_MESSAGE') { if (json.messageType === 'DATA_MESSAGE') {
for (let logEventsIndex = 0; logEventsIndex < json.logEvents.length; logEventsIndex++) { for (let logEventsIndex = 0; logEventsIndex < json.logEvents.length; logEventsIndex++) {
const message = json.logEvents[logEventsIndex].message;
if (json.logEvents[logEventsIndex].message.includes(taskDef.logid)) { if (json.logEvents[logEventsIndex].message.includes(taskDef.logid)) {
cloud_runner_logger_1.default.log('End of cloud runner job logs'); cloud_runner_logger_1.default.log('End of cloud runner job logs');
readingLogs = false; readingLogs = false;
} }
else { else if (message.includes('Rebuilding Library because the asset database could not be found!')) {
const message = json.logEvents[logEventsIndex].message; core.warning('LIBRARY NOT FOUND!');
if (message.includes('Rebuilding Library because the asset database could not be found!')) {
core.warning('LIBRARY NOT FOUND!');
}
cloud_runner_logger_1.default.log(message);
} }
cloud_runner_logger_1.default.log(message);
} }
} }
} }

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -168,16 +168,14 @@ class AWSBuildRunner {
); );
if (json.messageType === 'DATA_MESSAGE') { if (json.messageType === 'DATA_MESSAGE') {
for (let logEventsIndex = 0; logEventsIndex < json.logEvents.length; logEventsIndex++) { for (let logEventsIndex = 0; logEventsIndex < json.logEvents.length; logEventsIndex++) {
const message = json.logEvents[logEventsIndex].message;
if (json.logEvents[logEventsIndex].message.includes(taskDef.logid)) { if (json.logEvents[logEventsIndex].message.includes(taskDef.logid)) {
CloudRunnerLogger.log('End of cloud runner job logs'); CloudRunnerLogger.log('End of cloud runner job logs');
readingLogs = false; readingLogs = false;
} else { } else if (message.includes('Rebuilding Library because the asset database could not be found!')) {
const message = json.logEvents[logEventsIndex].message; core.warning('LIBRARY NOT FOUND!');
if (message.includes('Rebuilding Library because the asset database could not be found!')) {
core.warning('LIBRARY NOT FOUND!');
}
CloudRunnerLogger.log(message);
} }
CloudRunnerLogger.log(message);
} }
} }
} }