chore: Refactor logs (#22824)

* Refactor logs

* Add specific info to log
This commit is contained in:
Joe Au-Yeung
2025-07-31 01:47:38 +01:00
committed by GitHub
parent 7fef683abf
commit 704bbf2757
3 changed files with 5 additions and 3 deletions
-1
View File
@@ -49,7 +49,6 @@ export const getCalendar = async (
log.warn(`calendar of type ${calendarType} is not implemented`);
return null;
}
log.info("Got calendarApp", calendarApp.lib.CalendarService);
const CalendarService = calendarApp.lib.CalendarService;
return new CalendarService(credential);
};
@@ -222,7 +222,7 @@ const _ensureAvailableUsers = async (
if (!dateRanges.length) {
loggerWithEventDetails.error(
`User does not have availability at this time.`,
`User ${user.id} does not have availability at this time.`,
piiFreeInputDataForLogging
);
return;
+4 -1
View File
@@ -277,7 +277,10 @@ export const getBusyCalendarTimes = async (
);
}
} catch (e) {
log.warn(safeStringify(e));
log.warn(`Error getting calendar availability`, {
selectedCalendarIds: selectedCalendars.map((calendar) => calendar.externalId),
error: safeStringify(e),
});
}
return results.reduce((acc, availability) => acc.concat(availability), []);
};