mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
actually track log items, and correctly remove them
This commit is contained in:
parent
a53c25d2ae
commit
42780df94f
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user