- Remove windowId from IInitData

- Send exthost logs location from renderer
- IExtensionService: Expose an API to get exthost logs location
This commit is contained in:
Sandeep Somavarapu
2018-09-04 18:39:22 +02:00
parent 8d0c573bf5
commit 810efbc85f
10 changed files with 66 additions and 46 deletions

View File

@@ -9,16 +9,19 @@ 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 { ExtHostLogServiceShape } from 'vs/workbench/api/node/extHost.protocol';
import { ExtensionHostLogFileName } from 'vs/workbench/services/extensions/common/extensions';
export class ExtHostLogService extends DelegatedLogService implements ILogService, ExtHostLogServiceShape {
private _logsPath: string;
constructor(
private _windowId: number,
logLevel: LogLevel,
private _logsPath: string
logsPath: string,
) {
super(createSpdLogService(`exthost${_windowId}`, logLevel, _logsPath));
super(createSpdLogService(ExtensionHostLogFileName, logLevel, logsPath));
this._logsPath = logsPath;
}
$setLevel(level: LogLevel): void {
@@ -26,6 +29,6 @@ export class ExtHostLogService extends DelegatedLogService implements ILogServic
}
getLogDirectory(extensionID: string): string {
return join(this._logsPath, `${extensionID}_${this._windowId}`);
return join(this._logsPath, extensionID);
}
}