Shortened log timestamp

This commit is contained in:
2019-05-24 03:23:53 +10:00
parent 44b54ada96
commit c28f4f0fe2
+2 -1
View File
@@ -15,7 +15,8 @@ let excluded = [ //errors that should not be logged
const log = (msg, ...args) => {
if (excluded.indexOf(msg) === -1) {
console.log(`log ${Date()}: ${msg} (${args.toString()})`);
let dateString = Date().replace(/\s\(.*\)/i, ''); //dumb formatting
console.log(`log ${dateString}: ${msg} (${args.toString()})`);
}
return msg;
}