chore: Refactor logs (#22824)
* Refactor logs * Add specific info to log
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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), []);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user