Browse Source

Pads milliseconds for alignment

main
Eric Amodio 7 years ago
parent
commit
e3059e26b2
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/logger.ts

+ 1
- 1
src/logger.ts View File

@ -74,6 +74,6 @@ export class Logger {
private static get timestamp(): string {
const now = new Date();
return `[${now.toISOString().replace(/T/, ' ').replace(/\..+/, '')}:${now.getUTCMilliseconds()}]`;
return `[${now.toISOString().replace(/T/, ' ').replace(/\..+/, '')}:${('00' + now.getUTCMilliseconds()).slice(-3)}]`;
}
}

Loading…
Cancel
Save