Skip to content

Commit

Permalink
feat: adds logs to both vscode logger and console.log
Browse files Browse the repository at this point in the history
The motivation behind this is to be able to inspect logs during CI failures.
  • Loading branch information
gnikit committed Mar 23, 2024
1 parent b822973 commit cdb8d92
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/services/logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ export class Logger {

private log(message: string, level: LogLevel): void {
const title = new Date().toLocaleTimeString();
this.channel.appendLine(`[${LogLevel[level]} - ${title}] ${message}`);
const formattedMessage = `[${LogLevel[level]} - ${title}] ${message}`;
this.channel.appendLine(formattedMessage);
console.log(formattedMessage); // useful for CI debugging
}
}

Expand Down

0 comments on commit cdb8d92

Please sign in to comment.