Improve logging

This commit is contained in:
Alex Dima
2021-10-22 14:45:20 +02:00
parent 3747b7d5f9
commit a30ea744d0
6 changed files with 23 additions and 9 deletions

View File

@@ -53,6 +53,7 @@ export const IHostUtils = createDecorator<IHostUtils>('IHostUtils');
export interface IHostUtils {
readonly _serviceBrand: undefined;
readonly pid: number | undefined;
exit(code: number): void;
exists(path: string): Promise<boolean>;
realpath(path: string): Promise<string>;
@@ -621,8 +622,10 @@ export abstract class AbstractExtHostExtensionService extends Disposable impleme
}
public async $extensionTestsExit(code: number): Promise<void> {
this._logService.info(`extension host terminating: test runner requested exit with code ${code}`);
this._logService.info(`exiting with code ${code}`);
this._logService.info(`Extension host terminating: test runner requested exit with code ${code}`);
if (this._hostUtils.pid) {
this._logService.info(`Extension host with pid ${this._hostUtils.pid} exiting with code ${code}`);
}
this._logService.flush();
this._hostUtils.exit(code);
}
@@ -638,7 +641,7 @@ export abstract class AbstractExtHostExtensionService extends Disposable impleme
.then(() => this._handleEagerExtensions())
.then(() => {
this._eagerExtensionsActivated.open();
this._logService.info(`eager extensions activated`);
this._logService.info(`Eager extensions activated`);
});
}