rename error => errors to avoid type clashing in ES

This commit is contained in:
Daniel García Aubert 2020-06-11 13:04:19 +02:00
parent bf250e592a
commit 2444b4c008

View File

@ -47,6 +47,9 @@ module.exports = function logCollector () {
// rename level => levelname to avoid type clashing in ES // rename level => levelname to avoid type clashing in ES
accEntry.levelname = LEVELS[accEntry.level]; accEntry.levelname = LEVELS[accEntry.level];
delete accEntry.level; delete accEntry.level;
accEntry.errors = accEntry.error;
delete accEntry.error;
accEntry.time = entry.time; accEntry.time = entry.time;
this.push(`${JSON.stringify(accEntry)}\n`); this.push(`${JSON.stringify(accEntry)}\n`);
logs.delete(id); logs.delete(id);