diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 5828b5bb88a..6000b0300db 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -4537,6 +4537,13 @@ declare module 'vscode' { * [`globalState`](#ExtensionContext.globalState) to store key value data. */ storagePath: string | undefined; + + /** + * An absolute file path of a directory in which the extension can create log files. + * The directory might not exist on disk and creation is up to the extension. However, + * the parent directory is guaranteed to be existent. + */ + logPath: string; } /** diff --git a/src/vs/workbench/api/node/extHostExtensionActivator.ts b/src/vs/workbench/api/node/extHostExtensionActivator.ts index c37e7b2dfe7..cbd8a70d649 100644 --- a/src/vs/workbench/api/node/extHostExtensionActivator.ts +++ b/src/vs/workbench/api/node/extHostExtensionActivator.ts @@ -29,6 +29,7 @@ export interface IExtensionContext { asAbsolutePath(relativePath: string): string; logger: ExtHostLogger; readonly logDirectory: string; + readonly logPath: string; } /** diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index 61ec236d842..f29e288412b 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -366,9 +366,11 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { return that._extHostLogService.getExtLogger(extensionDescription.id); }, get logDirectory() { + console.warn(`this PROPOSED API has been RENAMED to 'logPath'`); checkProposedApiEnabled(extensionDescription); return that._extHostLogService.getLogDirectory(extensionDescription.id); - } + }, + logPath: that._extHostLogService.getLogDirectory(extensionDescription.id) }); }); }