mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +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) {
|
wrapLog(labelOrValues, callback, logLevel = this._baseLogLevel) {
|
||||||
const item = new LogItem(labelOrValues, logLevel, this._platform, this._anonymize);
|
const item = new LogItem(labelOrValues, logLevel, this._platform, this._anonymize);
|
||||||
|
this._openItems.add(item);
|
||||||
|
|
||||||
const finishItem = () => {
|
const finishItem = () => {
|
||||||
const serialized = item.serialize(this._baseLogLevel);
|
const serialized = item.serialize(this._baseLogLevel);
|
||||||
if (serialized) {
|
if (serialized) {
|
||||||
this._persistItem(serialized);
|
this._persistItem(serialized);
|
||||||
}
|
}
|
||||||
this._openItems.remove(item);
|
this._openItems.delete(item);
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user