Skip to content

Commit

Permalink
Cherry picked logging changes from
Browse files Browse the repository at this point in the history
  • Loading branch information
phw198 committed Feb 27, 2022
2 parents e4e0a65 + 28eb4c9 commit 5cb9bde
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/OutlookGoogleCalendarSync/GoogleOgcs/GoogleCalendar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public List<Event> GetCalendarEntriesInRecurrence(String recurringEventId) {
Int16 pageNum = 1;

try {
log.Debug("Retrieving all recurring event instances from Google.");
log.Debug("Retrieving all recurring event instances from Google for " + recurringEventId);
do {
EventsResource.InstancesRequest ir = Service.Events.Instances(Sync.Engine.Calendar.Instance.Profile.UseGoogleCalendar.Id, recurringEventId);
ir.ShowDeleted = true;
Expand Down Expand Up @@ -201,6 +201,7 @@ public List<Event> GetCalendarEntriesInRecurrence(String recurringEventId) {
if (request.Items != null) result.AddRange(request.Items);
}
} while (pageToken != null);
log.Fine(request.Items.Count + " recurring event instances found.");
return result;

} catch (System.Exception ex) {
Expand Down
2 changes: 1 addition & 1 deletion src/OutlookGoogleCalendarSync/Recurrence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ public static void UpdateGoogleExceptions(AppointmentItem ai, Event ev, Boolean
aiExcp = oExcp.AppointmentItem;
//Force a compare of the exception if both G and O have been modified in last 24 hours
TimeSpan modifiedDiff = (TimeSpan)(gExcp.Updated - aiExcp.LastModificationTime);
log.Fine("Difference in days between G and O exception: " + modifiedDiff);
log.Fine("Modification time difference (in days) between G and O exception: " + modifiedDiff);
Boolean forceCompare = modifiedDiff < TimeSpan.FromDays(1);
GoogleOgcs.Calendar.Instance.UpdateCalendarEntry(aiExcp, gExcp, ref excp_itemModified, forceCompare);
if (forceCompare && excp_itemModified == 0 && DateTime.Now > aiExcp.LastModificationTime.AddDays(1)) {
Expand Down

0 comments on commit 5cb9bde

Please sign in to comment.