Log Traces at correct level when TSServer exists as expected. Fixes #25381

This commit is contained in:
Matt Bierner
2017-04-27 16:11:40 -07:00
parent 04f5fbb140
commit db036ea0c7

View File

@@ -597,9 +597,14 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient
this.serviceExited(false);
});
childProcess.on('exit', (code: any) => {
this.error(`TSServer exited with code: ${code === null || typeof code === 'undefined' ? 'unknown' : code}`);
if (code === null || typeof code === 'undefined') {
this.info(`TSServer exited`);
} else {
this.error(`TSServer exited with code: ${code}`);
}
if (this.tsServerLogFile) {
this.error(`TSServer log file: ${this.tsServerLogFile}`);
this.info(`TSServer log file: ${this.tsServerLogFile}`);
}
this.serviceExited(true);
});