Skip to content

Commit

Permalink
Add verbose logs
Browse files Browse the repository at this point in the history
  • Loading branch information
SRichner committed Feb 26, 2024
1 parent 17bdbc6 commit 1d8a900
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/electron/electron/ipc/IpcHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export class IpcHandler {
triggerPermissionCheckAccessibility: this.triggerPermissionCheckAccessibility,
triggerPermissionCheckScreenRecording: this.triggerPermissionCheckScreenRecording
};
LOG.debug('IpcHandler constructor called');
}

public init(): void {
Expand Down
2 changes: 2 additions & 0 deletions src/electron/electron/main/services/AppUpdaterService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export default class AppUpdaterService extends EventEmitter {
autoUpdater.logger = LOG;
autoUpdater.autoDownload = false;

LOG.debug('AppUpdaterService constructor called');

autoUpdater.on('checking-for-update', () => {
LOG.info('Checking for update...');
});
Expand Down
2 changes: 1 addition & 1 deletion src/electron/electron/main/services/DatabaseService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class DatabaseService {
type: 'better-sqlite3',
database: dbPath,
synchronize: true,
logging: false,
logging: true,
entities: [ExperienceSamplingResponseEntity, Settings, UserInputEntity, WindowActivityEntity]
};

Expand Down
5 changes: 4 additions & 1 deletion src/electron/electron/main/services/SchedulingService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ export class SchedulingService {

constructor(windowService: WindowService) {
this.windowService = windowService;
LOG.debug('SchedulingService constructor called');
}
public init() {
LOG.silly('Initializing SchedulingService');
this.experienceSamplingJob = schedule.scheduleJob(`0 * * * *`, (fireDate: Date): void => {
LOG.info(`Experience Sampling Job was supposed to fire at ${fireDate}, fired at ${new Date()}`);
LOG.info(
`Experience Sampling Job was supposed to fire at ${fireDate}, fired at ${new Date()}`
);
this.handleExperienceSamplingJob();
});

Expand Down
1 change: 1 addition & 0 deletions src/electron/electron/main/services/SettingsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const LOG = getLogger('SettingsService');
export class SettingsService {
public async init(): Promise<void> {
const isSettingsAlreadyCreated: boolean = await this.isSettingsAlreadyCreated();
LOG.debug(`SettingsService.init: isSettingsAlreadyCreated=${isSettingsAlreadyCreated}`);

if (!isSettingsAlreadyCreated) {
LOG.info(`Creating default settings`);
Expand Down
1 change: 1 addition & 0 deletions src/electron/electron/main/services/WindowService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export class WindowService {

constructor(appUpdaterService: AppUpdaterService) {
this.appUpdaterService = appUpdaterService;
LOG.debug('WindowService constructor called');

this.appUpdaterService.on(
'update-tray',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export class TrackerService {

constructor(trackerConfig: TrackerConfig) {
this.config = trackerConfig;
LOG.debug(`TrackerService.constructor: config=${JSON.stringify(this.config)}`);
}

public async registerTrackerCallback(
Expand Down

0 comments on commit 1d8a900

Please sign in to comment.