diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index c2395514f74..a4a5171dc57 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -6226,14 +6226,9 @@ declare module 'vscode' { /** * Creates a new [output channel](#OutputChannel) with the given name. * - * By default, Output channels use a separate transport mechanism when appending data. - * This helps to reduce CPU load on the UI process but also means that the output channel UI updates with a small delay. - * Use the force-flag to enforce immediate updates at the cost of higher CPU usage. - * * @param name Human-readable string which will be used to represent the channel in the UI. - * @param options Options to control how the channel will be created. */ - export function createOutputChannel(name: string, options?: { force?: boolean }): OutputChannel; + export function createOutputChannel(name: string): OutputChannel; /** * Create and show a new webview panel. diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 5933a5896d6..153d4c129d5 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -435,8 +435,8 @@ export function createApiFactory( withProgress(options: vscode.ProgressOptions, task: (progress: vscode.Progress<{ message?: string; worked?: number }>, token: vscode.CancellationToken) => Thenable) { return extHostProgress.withProgress(extension, options, task); }, - createOutputChannel(name: string, options?: { force?: boolean }): vscode.OutputChannel { - return extHostOutputService.createOutputChannel(name, options); + createOutputChannel(name: string): vscode.OutputChannel { + return extHostOutputService.createOutputChannel(name); }, createWebviewPanel(viewType: string, title: string, showOptions: vscode.ViewColumn | { viewColumn: vscode.ViewColumn, preserveFocus?: boolean }, options: vscode.WebviewPanelOptions & vscode.WebviewOptions): vscode.WebviewPanel { return extHostWebviews.createWebview(extension.extensionLocation, viewType, title, showOptions, options); diff --git a/src/vs/workbench/api/node/extHostOutputService.ts b/src/vs/workbench/api/node/extHostOutputService.ts index 4cabdb257f6..aee44bec0e9 100644 --- a/src/vs/workbench/api/node/extHostOutputService.ts +++ b/src/vs/workbench/api/node/extHostOutputService.ts @@ -122,21 +122,17 @@ export class ExtHostOutputService { this._proxy = mainContext.getProxy(MainContext.MainThreadOutputService); } - createOutputChannel(name: string, options?: { force?: boolean }): vscode.OutputChannel { + createOutputChannel(name: string): vscode.OutputChannel { name = name.trim(); if (!name) { throw new Error('illegal argument `name`. must not be falsy'); } else { - if (options && options.force) { + // Do not crash if logger cannot be created + try { + return new ExtHostOutputChannelBackedByFile(name, this._outputDir, this._proxy); + } catch (error) { + console.log(error); return new ExtHostPushOutputChannel(name, this._proxy); - } else { - // Do not crash if logger cannot be created - try { - return new ExtHostOutputChannelBackedByFile(name, this._outputDir, this._proxy); - } catch (error) { - console.log(error); - return new ExtHostPushOutputChannel(name, this._proxy); - } } } }