Skip to content

Commit

Permalink
fix meta not resetting
Browse files Browse the repository at this point in the history
  • Loading branch information
Ratismal committed Oct 9, 2018
1 parent 18f2dbb commit 8ade8da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Loggr.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ module.exports = class CatLoggr {
}

stream.write(`${shardText}${timestamp.formatted}${levelStr} ${text}\n`);

this._meta = {};
return this;
}

Expand All @@ -277,7 +279,7 @@ module.exports = class CatLoggr {
*/
meta(meta = {}) {
let temp = this._defaultMeta;
Object.assign(temp, meta);
Object.assign({}, temp, meta);
this._meta = temp;
return this;
}
Expand Down

0 comments on commit 8ade8da

Please sign in to comment.