summaryrefslogtreecommitdiffhomepage
path: root/gui/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/shared')
-rw-r--r--gui/src/shared/logging.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/gui/src/shared/logging.ts b/gui/src/shared/logging.ts
index 77d0168701..c2537e00d4 100644
--- a/gui/src/shared/logging.ts
+++ b/gui/src/shared/logging.ts
@@ -25,8 +25,12 @@ export class Logger {
public verbose = (...data: unknown[]) => this.log(LogLevel.verbose, ...data);
public debug = (...data: unknown[]) => this.log(LogLevel.debug, ...data);
- public dispose() {
- this.outputs.forEach((output) => output.dispose?.());
+ public disposeDisposableOutputs() {
+ // Keep the outputs that aren't disposable to continue to forward log messages to them.
+ this.outputs = this.outputs.filter((output) => {
+ output.dispose?.();
+ return output.dispose === undefined;
+ });
}
private getDateString(): string {