From 54f28933055124d6ba3808a787f6947c929f9db0 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Thu, 6 Jan 2022 01:07:24 -0500 Subject: [PATCH] Removes unneeded regex from logging timestamp --- src/logger.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/logger.ts b/src/logger.ts index bd487de..17a7903 100644 --- a/src/logger.ts +++ b/src/logger.ts @@ -190,7 +190,7 @@ export class Logger { }; } - static showOutputChannel() { + static showOutputChannel(): void { this.output?.show(); } @@ -227,11 +227,7 @@ export class Logger { } private static get timestamp(): string { - const now = new Date(); - return `[${now - .toISOString() - .replace(/T/, ' ') - .replace(/\..+/, emptyStr)}:${`00${now.getUTCMilliseconds()}`.slice(-3)}]`; + return `[${new Date().toISOString().replace(/T/, ' ').slice(0, -1)}]`; } private static toLoggableParams(debugOnly: boolean, params: any[]) {