Skip to content

Commit

Permalink
Make log output easier to read
Browse files Browse the repository at this point in the history
  • Loading branch information
cdupuis committed Aug 23, 2018
1 parent 0f5452e commit 2e9edb9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/handlers/events/delivery/goals/FulfillGoalOnRequested.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,21 @@ export class FulfillGoalOnRequested implements HandleEvent<OnAnyRequestedSdmGoal
}

async function reportStart(sdmGoal: SdmGoalEvent, progressLog: ProgressLog) {
progressLog.write(`---`);
progressLog.write(`/--`);
progressLog.write(`Repository: ${sdmGoal.push.repo.owner}/${sdmGoal.push.repo.name}/${sdmGoal.branch}`);
progressLog.write(`Sha: ${sdmGoal.sha}`);
progressLog.write(`Goal: ${sdmGoal.name} - ${sdmGoal.environment.slice(2)}`);
progressLog.write(`GoalSet: ${sdmGoal.goalSet} - ${sdmGoal.goalSetId}`);
progressLog.write(
`SDM: ${automationClientInstance().configuration.name}:${automationClientInstance().configuration.version}`);
progressLog.write(`---`);
progressLog.write("\\--");
await progressLog.flush();
}

async function reportEndAndClose(result: any, start: number, progressLog: ProgressLog) {
progressLog.write(`---`);
progressLog.write(`/--`);
progressLog.write(`Result: ${stringify(result, possibleAxiosObjectReplacer, 0)}`);
progressLog.write(`Duration: ${formatDuration(Date.now() - start)}`);
progressLog.write(`---`);
progressLog.write("\\--");
await progressLog.close();
}
4 changes: 2 additions & 2 deletions src/internal/delivery/build/local/SpawnBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ export class SpawnBuilder extends LocalBuilder implements LogInterpretation {
...br,
};
delete r.childProcess;
log.write("---");
log.write("/--");
log.write(`Result: ${JSON.stringify(r, possibleAxiosObjectReplacer, 0)}`);
log.write("---");
log.write("\\--");
return executeOne(buildCommand);
});
}
Expand Down

0 comments on commit 2e9edb9

Please sign in to comment.