chore: fix length padding

This commit is contained in:
2020-01-25 13:40:44 +01:00
parent ed789b835e
commit b7efe3f08c

View File

@ -12,7 +12,7 @@ const maxFunctionLogLength = 60;
const myFormat = printf(({ timestamp, loc, level, message }) => { const myFormat = printf(({ timestamp, loc, level, message }) => {
const start = process.hrtime(); const start = process.hrtime();
if (loc) { if (loc) {
return `${timestamp} ${level}: ${message.padEnd(90)} ${loc.padEnd( return `${timestamp} ${level}: ${message.padEnd(105 - level.length)} ${loc.padEnd(
60 60
)} log: ${(process.hrtime(start)[1] / 1000000).toFixed(2)}ms`; )} log: ${(process.hrtime(start)[1] / 1000000).toFixed(2)}ms`;
} }