Skip to content

Commit

Permalink
Add maintenance task logging
Browse files Browse the repository at this point in the history
  • Loading branch information
webfiltered committed Jan 29, 2025
1 parent 3f82e55 commit 6370c58
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/install/installationManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ export class InstallationManager {
});
}
};
const sendLogIpc = (data: string) => this.appWindow.send(IPC_CHANNELS.LOG_MESSAGE, data);
const sendLogIpc = (data: string) => {
log.info(data);
this.appWindow.send(IPC_CHANNELS.LOG_MESSAGE, data);
};

ipcMain.handle(IPC_CHANNELS.GET_VALIDATION_STATE, () => {
installation.onUpdate?.(installation.validation);
Expand Down
6 changes: 4 additions & 2 deletions src/virtualEnvironment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,8 @@ export class VirtualEnvironment implements HasTelemetry {
try {
await this.#using(() => this.ensurePip(callbacks));
return true;
} catch {
} catch (error) {
log.error('Failed to upgrade pip:', error);
return false;
}
}
Expand All @@ -610,7 +611,8 @@ export class VirtualEnvironment implements HasTelemetry {
const callbacks: ProcessCallbacks = { onStdout: onData };
await this.#using(() => this.createVenvWithPython(callbacks));
return true;
} catch {
} catch (error) {
log.error('Failed to create virtual environment:', error);
return false;
}
}
Expand Down

0 comments on commit 6370c58

Please sign in to comment.