Skip to content

Commit

Permalink
Fix: make results logger errors manageable. (#382)
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock authored Jul 8, 2024
1 parent c609ec0 commit f00ed98
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/src/tester/ResultLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ export class ConsoleResultLogger implements ResultLogger {

#log_evaluation (evaluation: Evaluation, title: string, prefix: number = 0): void {
const result = ansi.padding(this.#result(evaluation.result), 0, prefix)
const message = evaluation.message != null ? `${ansi.gray('(' + evaluation.message + ')')}` : ''
var message = evaluation.message
if (message !== undefined && message?.length > 128 && !this._verbose) message = message.split(',')[0] + ', ...'
if (message !== undefined) message = ansi.gray(`${message}`)
console.log(`${result} ${title} ${message}`)
}

Expand Down

0 comments on commit f00ed98

Please sign in to comment.