Skip to content

Commit

Permalink
#91696 start-up log
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 authored and joaomoreno committed Jul 21, 2020
1 parent d398e0b commit c4519c6
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/vs/platform/userDataSync/common/userDataAutoSyncService.ts
Expand Up @@ -97,7 +97,12 @@ export class UserDataAutoSyncService extends UserDataAutoSyncEnablementService i
this.syncTriggerDelayer = this._register(new Delayer<void>(0));

if (userDataSyncStoreService.userDataSyncStore) {
this.updateAutoSync(true);
if (this.isEnabled()) {
this.logService.info('Auto Sync is enabled.');
} else {
this.logService.info('Auto Sync is disabled.');
}
this.updateAutoSync();
if (this.hasToDisableMachineEventually()) {
this.disableMachineEventually();
}
Expand All @@ -108,7 +113,7 @@ export class UserDataAutoSyncService extends UserDataAutoSyncEnablementService i
}
}

private updateAutoSync(init?: boolean): void {
private updateAutoSync(): void {
const { enabled, message } = this.isAutoSyncEnabled();
if (enabled) {
if (this.autoSync.value === undefined) {
Expand All @@ -128,8 +133,8 @@ export class UserDataAutoSyncService extends UserDataAutoSyncEnablementService i
this.autoSync.clear();
}

/* log message when auto sync is disabled during start up or when auto sync is not disabled by user */
else if (message && (init || this.isEnabled())) {
/* log message when auto sync is not disabled by user */
else if (message && this.isEnabled()) {
this.logService.info(message);
}
}
Expand Down

0 comments on commit c4519c6

Please sign in to comment.