mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-11 04:27:40 +01:00
also remove deferred log items from open list when finishing them
otherwise they end up in the logs twice when exporting
This commit is contained in:
parent
6aab049052
commit
5527e2b22c
@ -159,6 +159,11 @@ export class Logger implements ILogger {
|
|||||||
this._openItems.clear();
|
this._openItems.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @internal */
|
||||||
|
_removeItemFromOpenList(item: LogItem): void {
|
||||||
|
this._openItems.delete(item);
|
||||||
|
}
|
||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
_persistItem(item: LogItem, filter?: LogFilter, forced?: boolean): void {
|
_persistItem(item: LogItem, filter?: LogFilter, forced?: boolean): void {
|
||||||
for (var i = 0; i < this.reporters.length; i += 1) {
|
for (var i = 0; i < this.reporters.length; i += 1) {
|
||||||
@ -186,6 +191,7 @@ class DeferredPersistRootLogItem extends LogItem {
|
|||||||
finish() {
|
finish() {
|
||||||
super.finish();
|
super.finish();
|
||||||
(this._logger as Logger)._persistItem(this, undefined, false);
|
(this._logger as Logger)._persistItem(this, undefined, false);
|
||||||
|
(this._logger as Logger)._removeItemFromOpenList(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
forceFinish() {
|
forceFinish() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user