forked from mystiq/hydrogen-web
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
1 changed files with 6 additions and 0 deletions
|
@ -159,6 +159,11 @@ export class Logger implements ILogger {
|
|||
this._openItems.clear();
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
_removeItemFromOpenList(item: LogItem): void {
|
||||
this._openItems.delete(item);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
_persistItem(item: LogItem, filter?: LogFilter, forced?: boolean): void {
|
||||
for (var i = 0; i < this.reporters.length; i += 1) {
|
||||
|
@ -186,6 +191,7 @@ class DeferredPersistRootLogItem extends LogItem {
|
|||
finish() {
|
||||
super.finish();
|
||||
(this._logger as Logger)._persistItem(this, undefined, false);
|
||||
(this._logger as Logger)._removeItemFromOpenList(this);
|
||||
}
|
||||
|
||||
forceFinish() {
|
||||
|
|
Loading…
Reference in a new issue