Do not rename level and error fields
This commit is contained in:
parent
2444b4c008
commit
49735308de
@ -44,12 +44,7 @@ module.exports = function logCollector () {
|
|||||||
|
|
||||||
if (end === true) {
|
if (end === true) {
|
||||||
const accEntry = logs.get(id);
|
const accEntry = logs.get(id);
|
||||||
// rename level => levelname to avoid type clashing in ES
|
accEntry.level = LEVELS[accEntry.level];
|
||||||
accEntry.levelname = LEVELS[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);
|
||||||
|
Loading…
Reference in New Issue
Block a user