提交 27c72d4e 编写于 作者: J Johannes Rieken

remove logDirectory, #43275

上级 66205890
......@@ -28,13 +28,13 @@ export default class LogDirectoryProvider {
@memoize
private logDirectory(): string | undefined {
try {
const path = this.context.logDirectory;
const path = this.context.logPath;
if (!fs.existsSync(path)) {
fs.mkdirSync(path);
}
return this.context.logDirectory;
return this.context.logPath;
} catch {
return undefined;
}
}
}
\ No newline at end of file
}
......@@ -434,16 +434,6 @@ declare module 'vscode' {
Off = 7
}
export interface ExtensionContext {
/**
* Path where an extension can write log files.
*
* Extensions must create this directory before writing to it. The parent directory will always exist.
*/
readonly logDirectory: string;
}
export namespace env {
/**
* Current logging level.
......
......@@ -26,7 +26,6 @@ export interface IExtensionContext {
extensionPath: string;
storagePath: string;
asAbsolutePath(relativePath: string): string;
readonly logDirectory: string;
readonly logPath: string;
}
......
......@@ -12,7 +12,7 @@ import { TPromise } from 'vs/base/common/winjs.base';
import { ExtensionDescriptionRegistry } from 'vs/workbench/services/extensions/node/extensionDescriptionRegistry';
import { IExtensionDescription } from 'vs/workbench/services/extensions/common/extensions';
import { ExtHostStorage } from 'vs/workbench/api/node/extHostStorage';
import { createApiFactory, initializeExtensionApi, checkProposedApiEnabled } from 'vs/workbench/api/node/extHost.api.impl';
import { createApiFactory, initializeExtensionApi } from 'vs/workbench/api/node/extHost.api.impl';
import { MainContext, MainThreadExtensionServiceShape, IWorkspaceData, IEnvironment, IInitData, ExtHostExtensionServiceShape, MainThreadTelemetryShape, IMainContext } from './extHost.protocol';
import { IExtensionMemento, ExtensionsActivator, ActivatedExtension, IExtensionAPI, IExtensionContext, EmptyExtension, IExtensionModule, ExtensionActivationTimesBuilder, ExtensionActivationTimes, ExtensionActivationReason, ExtensionActivatedByEvent } from 'vs/workbench/api/node/extHostExtensionActivator';
import { ExtHostConfiguration } from 'vs/workbench/api/node/extHostConfiguration';
......@@ -361,11 +361,6 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
get extensionPath() { return extensionDescription.extensionLocation.fsPath; },
storagePath: this._storagePath.value(extensionDescription),
asAbsolutePath: (relativePath: string) => { return join(extensionDescription.extensionLocation.fsPath, relativePath); },
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)
});
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册