Add timestamps to log messages
This commit is contained in:
parent
bf25342122
commit
fec64103f6
1 changed files with 2 additions and 1 deletions
|
@ -126,7 +126,8 @@ connect().then(async conn => {
|
|||
|
||||
logFn: (level, msg) => {
|
||||
if (level === "debug") return;
|
||||
console.log(`[${level.toUpperCase()}] ${msg}`);
|
||||
const ts = moment().format("YYYY-MM-DD HH:mm:ss");
|
||||
console.log(`[${ts}] [${level.toUpperCase()}] ${msg}`);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue