From 42780df94fadc8190665706c1ba58cf6049d11fb Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 12 Feb 2021 18:36:04 +0100 Subject: [PATCH] actually track log items, and correctly remove them --- src/logging/BaseLogger.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/logging/BaseLogger.js b/src/logging/BaseLogger.js index 6b2f433a..830cced0 100644 --- a/src/logging/BaseLogger.js +++ b/src/logging/BaseLogger.js @@ -27,13 +27,14 @@ export class BaseLogger { wrapLog(labelOrValues, callback, logLevel = this._baseLogLevel) { const item = new LogItem(labelOrValues, logLevel, this._platform, this._anonymize); + this._openItems.add(item); const finishItem = () => { const serialized = item.serialize(this._baseLogLevel); if (serialized) { this._persistItem(serialized); } - this._openItems.remove(item); + this._openItems.delete(item); }; try {