Support log output channels for extensions (#161249)

* introduce log api in extension context

* separate registering output vs log channel

* Separate extension log channels in show logs command

* add logging error to embedder logger

* show extension log in the extension editor

* configure log level per extension

* change the order of log entries

* introduce logger

* align with output chanel

* revert changes

* fixes
This commit is contained in:
Sandeep Somavarapu
2022-09-19 18:03:41 +02:00
committed by GitHub
parent 82431003f3
commit 35c7ee9d02
15 changed files with 333 additions and 157 deletions

View File

@@ -703,8 +703,8 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
withProgress<R>(options: vscode.ProgressOptions, task: (progress: vscode.Progress<{ message?: string; worked?: number }>, token: vscode.CancellationToken) => Thenable<R>) {
return extHostProgress.withProgress(extension, options, task);
},
createOutputChannel(name: string, languageId?: string): vscode.OutputChannel {
return extHostOutputService.createOutputChannel(name, languageId, extension);
createOutputChannel(name: string, options: string | { log: true } | undefined): any {
return extHostOutputService.createOutputChannel(name, options, extension);
},
createWebviewPanel(viewType: string, title: string, showOptions: vscode.ViewColumn | { viewColumn: vscode.ViewColumn; preserveFocus?: boolean }, options?: vscode.WebviewPanelOptions & vscode.WebviewOptions): vscode.WebviewPanel {
return extHostWebviewPanels.createWebviewPanel(extension, viewType, title, showOptions, options);