Skip to content

Commit 070de6c

Browse files
authored
flush log channels if they are visible (microsoft#165718)
1 parent 9f22d98 commit 070de6c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/vs/workbench/api/common/extHostOutput.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ class ExtHostOutputChannel extends AbstractMessageLogger implements vscode.LogOu
5151

5252
append(value: string): void {
5353
this.info(value);
54-
if (this.visible) {
55-
this.logger.flush();
56-
this.proxy.$update(this.id, OutputChannelUpdateMode.Append);
57-
}
5854
}
5955

6056
clear(): void {
@@ -84,6 +80,10 @@ class ExtHostOutputChannel extends AbstractMessageLogger implements vscode.LogOu
8480
protected log(level: LogLevel, message: string): void {
8581
this.offset += VSBuffer.fromString(message).byteLength;
8682
log(this.logger, level, message);
83+
if (this.visible) {
84+
this.logger.flush();
85+
this.proxy.$update(this.id, OutputChannelUpdateMode.Append);
86+
}
8787
}
8888

8989
override dispose(): void {

0 commit comments

Comments
 (0)