Reduce extension host IInitData

This commit is contained in:
Alex Dima
2018-03-20 16:55:38 +01:00
parent f8007cd6bd
commit 262134cfd8
5 changed files with 9 additions and 17 deletions

View File

@@ -9,7 +9,6 @@ import { join } from 'vs/base/common/paths';
import { LogLevel } from 'vs/workbench/api/node/extHostTypes';
import { ILogService, DelegatedLogService } from 'vs/platform/log/common/log';
import { createSpdLogService } from 'vs/platform/log/node/spdlogService';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { ExtHostLogServiceShape } from 'vs/workbench/api/node/extHost.protocol';
@@ -20,9 +19,9 @@ export class ExtHostLogService extends DelegatedLogService implements ILogServic
constructor(
private _windowId: number,
logLevel: LogLevel,
private _environmentService: IEnvironmentService
private _logsPath: string
) {
super(createSpdLogService(`exthost${_windowId}`, logLevel, _environmentService.logsPath));
super(createSpdLogService(`exthost${_windowId}`, logLevel, _logsPath));
}
$setLevel(level: LogLevel): void {
@@ -39,7 +38,7 @@ export class ExtHostLogService extends DelegatedLogService implements ILogServic
}
getLogDirectory(extensionID: string): string {
return join(this._environmentService.logsPath, `${extensionID}_${this._windowId}`);
return join(this._logsPath, `${extensionID}_${this._windowId}`);
}
private createLogger(extensionID: string): ExtHostLogger {