mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 01:58:53 +01:00
- Remove windowId from IInitData
- Send exthost logs location from renderer - IExtensionService: Expose an API to get exthost logs location
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user