mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Log correct tsserver path (#173708)
Fixes #173707 We previously converted the TS Server log from a simple string to an object. However there were a few cases where this object was incorrectly being converted into a UI string, resulting in `[Object object]`
This commit is contained in:
@@ -142,12 +142,12 @@ export class TypeScriptServerSpawner {
|
||||
const { args, tsServerLog, tsServerTraceDirectory } = this.getTsServerArgs(kind, configuration, version, apiVersion, pluginManager, canceller.cancellationPipeName);
|
||||
|
||||
if (TypeScriptServerSpawner.isLoggingEnabled(configuration)) {
|
||||
if (!isWeb()) {
|
||||
if (tsServerLog) {
|
||||
this._logger.info(`<${kind}> Log file: ${tsServerLog}`);
|
||||
} else {
|
||||
this._logger.error(`<${kind}> Could not create log directory`);
|
||||
}
|
||||
if (tsServerLog?.type === 'file') {
|
||||
this._logger.info(`<${kind}> Log file: ${tsServerLog.uri.fsPath}`);
|
||||
} else if (tsServerLog?.type === 'output') {
|
||||
this._logger.info(`<${kind}> Logging to output`);
|
||||
} else {
|
||||
this._logger.error(`<${kind}> Could not create TS Server log`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ export class TypeScriptServerSpawner {
|
||||
args.push('--enableProjectWideIntelliSenseOnWeb');
|
||||
}
|
||||
|
||||
return { args, tsServerLog: tsServerLog, tsServerTraceDirectory };
|
||||
return { args, tsServerLog, tsServerTraceDirectory };
|
||||
}
|
||||
|
||||
private static isLoggingEnabled(configuration: TypeScriptServiceConfiguration) {
|
||||
|
||||
@@ -422,8 +422,8 @@ export default class TypeScriptServiceClient extends Disposable implements IType
|
||||
|
||||
this.serverState = new ServerState.Errored(err, handle.tsServerLog);
|
||||
this.error('TSServer errored with error.', err);
|
||||
if (handle.tsServerLog) {
|
||||
this.error(`TSServer log file: ${handle.tsServerLog}`);
|
||||
if (handle.tsServerLog?.type === 'file') {
|
||||
this.error(`TSServer log file: ${handle.tsServerLog.uri.fsPath}`);
|
||||
}
|
||||
|
||||
/* __GDPR__
|
||||
@@ -462,8 +462,8 @@ export default class TypeScriptServiceClient extends Disposable implements IType
|
||||
return;
|
||||
}
|
||||
|
||||
if (handle.tsServerLog) {
|
||||
this.info(`TSServer log file: ${handle.tsServerLog}`);
|
||||
if (handle.tsServerLog?.type === 'file') {
|
||||
this.info(`TSServer log file: ${handle.tsServerLog.uri.fsPath}`);
|
||||
}
|
||||
this.serviceExited(!this.isRestarting);
|
||||
this.isRestarting = false;
|
||||
|
||||
Reference in New Issue
Block a user