Browse Source

Removes unneeded regex from logging timestamp

main
Eric Amodio 2 years ago
parent
commit
54f2893305
1 changed files with 2 additions and 6 deletions
  1. +2
    -6
      src/logger.ts

+ 2
- 6
src/logger.ts View File

@ -190,7 +190,7 @@ export class Logger {
}; };
} }
static showOutputChannel() {
static showOutputChannel() class="o">: void {
this.output?.show(); this.output?.show();
} }
@ -227,11 +227,7 @@ export class Logger {
} }
private static get timestamp(): string { 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[]) { private static toLoggableParams(debugOnly: boolean, params: any[]) {

Loading…
Cancel
Save