fix: message could also be non string
This commit is contained in:
@ -12,7 +12,7 @@ const maxFunctionLogLength = 60;
|
||||
const myFormat = printf(({ timestamp, loc, level, message }) => {
|
||||
const start = process.hrtime();
|
||||
if (loc) {
|
||||
return `${timestamp} ${level}: ${message.padEnd(105 - level.length)} ${loc.padEnd(
|
||||
return `${timestamp} ${level}: ${message.toString().padEnd(105 - level.length)} ${loc.padEnd(
|
||||
60
|
||||
)} log: ${(process.hrtime(start)[1] / 1000000).toFixed(2)}ms`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user