Skip to content

Commit 230cb19

Browse files
author
Benjamin Pasero
committed
web - log info when unload is triggered
1 parent 6ee37a6 commit 230cb19

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/vs/workbench/services/lifecycle/browser/lifecycleService.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ export class BrowserLifecycleService extends AbstractLifecycleService {
2828
}
2929

3030
private onBeforeUnload(): string | null {
31+
const logService = this.logService;
32+
logService.info('[lifecycle] onBeforeUnload triggered');
33+
3134
let veto = false;
3235

3336
// Before Shutdown
@@ -36,7 +39,7 @@ export class BrowserLifecycleService extends AbstractLifecycleService {
3639
if (value === true) {
3740
veto = true;
3841
} else if (value instanceof Promise && !veto) {
39-
console.warn(new Error('Long running onBeforeShutdown currently not supported in the web'));
42+
logService.error('[lifecycle] Long running onBeforeShutdown currently not supported in the web');
4043
veto = true;
4144
}
4245
},
@@ -51,7 +54,7 @@ export class BrowserLifecycleService extends AbstractLifecycleService {
5154
// No Veto: continue with Will Shutdown
5255
this._onWillShutdown.fire({
5356
join() {
54-
console.warn(new Error('Long running onWillShutdown currently not supported in the web'));
57+
logService.error('[lifecycle] Long running onWillShutdown currently not supported in the web');
5558
},
5659
reason: ShutdownReason.QUIT
5760
});

0 commit comments

Comments
 (0)