@@ -95,26 +95,26 @@ const CalendarFetcherUtils = {
9595 const oneDayInMs = 24 * 60 * 60000 ;
9696 let searchFromDate = pastLocalMoment . clone ( ) . subtract ( Math . max ( durationInMs , oneDayInMs ) , "milliseconds" ) . toDate ( ) ;
9797 let searchToDate = futureLocalMoment . clone ( ) . add ( 1 , "days" ) . toDate ( ) ;
98- Log . debug ( `[calendar] Search for recurring events between: ${ searchFromDate } and ${ searchToDate } ` ) ;
98+ Log . debug ( `Search for recurring events between: ${ searchFromDate } and ${ searchToDate } ` ) ;
9999
100100 // if until is set, and its a full day event, force the time to midnight. rrule gets confused with non-00 offset
101101 // looks like MS Outlook sets the until time incorrectly for fullday events
102102 if ( ( rule . options . until !== undefined ) && CalendarFetcherUtils . isFullDayEvent ( event ) ) {
103- Log . debug ( "[calendar] fixup rrule until" ) ;
103+ Log . debug ( "fixup rrule until" ) ;
104104 rule . options . until = moment ( rule . options . until ) . clone ( ) . startOf ( "day" ) . add ( 1 , "day" )
105105 . toDate ( ) ;
106106 }
107107
108- Log . debug ( "[calendar] fix rrule start=" , rule . options . dtstart ) ;
109- Log . debug ( "[calendar] event before rrule.between=" , JSON . stringify ( event , null , 2 ) , "exdates=" , event . exdate ) ;
110- Log . debug ( `[calendar] RRule: ${ rule . toString ( ) } ` ) ;
108+ Log . debug ( "fix rrule start=" , rule . options . dtstart ) ;
109+ Log . debug ( "event before rrule.between=" , JSON . stringify ( event , null , 2 ) , "exdates=" , event . exdate ) ;
110+ Log . debug ( `RRule: ${ rule . toString ( ) } ` ) ;
111111 rule . options . tzid = null ; // RRule gets *very* confused with timezones
112112
113113 let dates = rule . between ( searchFromDate , searchToDate , true , ( ) => {
114114 return true ;
115115 } ) ;
116116
117- Log . debug ( `[calendar] Title: ${ event . summary } , with dates: \n\n${ JSON . stringify ( dates ) } \n` ) ;
117+ Log . debug ( `Title: ${ event . summary } , with dates: \n\n${ JSON . stringify ( dates ) } \n` ) ;
118118
119119 // shouldn't need this anymore, as RRULE not passed junk
120120 dates = dates . filter ( ( d ) => {
@@ -140,7 +140,7 @@ const CalendarFetcherUtils = {
140140 return CalendarFetcherUtils . isFullDayEvent ( event ) ? startMoment . startOf ( "day" ) : startMoment ;
141141 } ;
142142
143- Log . debug ( `[calendar] There are ${ Object . entries ( data ) . length } calendar entries.` ) ;
143+ Log . debug ( `There are ${ Object . entries ( data ) . length } calendar entries.` ) ;
144144
145145 const now = moment ( ) ;
146146 const pastLocalMoment = config . includePastEvents ? now . clone ( ) . startOf ( "day" ) . subtract ( config . maximumNumberOfDays , "days" ) : now ;
@@ -153,10 +153,10 @@ const CalendarFetcherUtils = {
153153 . subtract ( 1 , "seconds" ) ;
154154
155155 Object . entries ( data ) . forEach ( ( [ key , event ] ) => {
156- Log . debug ( "[calendar] Processing entry..." ) ;
156+ Log . debug ( "Processing entry..." ) ;
157157
158158 const title = CalendarFetcherUtils . getTitleFromEvent ( event ) ;
159- Log . debug ( `[calendar] title: ${ title } ` ) ;
159+ Log . debug ( `title: ${ title } ` ) ;
160160
161161 // Return quickly if event should be excluded.
162162 let { excluded, eventFilterUntil } = this . shouldEventBeExcluded ( config , title ) ;
@@ -174,7 +174,7 @@ const CalendarFetcherUtils = {
174174 }
175175
176176 if ( event . type === "VEVENT" ) {
177- Log . debug ( `[calendar] Event:\n${ JSON . stringify ( event , null , 2 ) } ` ) ;
177+ Log . debug ( `Event:\n${ JSON . stringify ( event , null , 2 ) } ` ) ;
178178 let eventStartMoment = eventDate ( event , "start" ) ;
179179 let eventEndMoment ;
180180
@@ -191,12 +191,12 @@ const CalendarFetcherUtils = {
191191 }
192192 }
193193
194- Log . debug ( `[calendar] start: ${ eventStartMoment . toDate ( ) } ` ) ;
195- Log . debug ( `[calendar] end: ${ eventEndMoment . toDate ( ) } ` ) ;
194+ Log . debug ( `start: ${ eventStartMoment . toDate ( ) } ` ) ;
195+ Log . debug ( `end: ${ eventEndMoment . toDate ( ) } ` ) ;
196196
197197 // Calculate the duration of the event for use with recurring events.
198198 const durationMs = eventEndMoment . valueOf ( ) - eventStartMoment . valueOf ( ) ;
199- Log . debug ( `[calendar] duration: ${ durationMs } ` ) ;
199+ Log . debug ( `duration: ${ durationMs } ` ) ;
200200
201201 const location = event . location || false ;
202202 const geo = event . geo || false ;
@@ -217,12 +217,12 @@ const CalendarFetcherUtils = {
217217
218218 let dateKey = recurringEventStartMoment . tz ( "UTC" ) . format ( "YYYY-MM-DD" ) ;
219219
220- Log . debug ( "[calendar] event date dateKey=" , dateKey ) ;
220+ Log . debug ( "event date dateKey=" , dateKey ) ;
221221 // For each date that we're checking, it's possible that there is a recurrence override for that one day.
222222 if ( curEvent . recurrences !== undefined ) {
223- Log . debug ( "[calendar] have recurrences=" , curEvent . recurrences ) ;
223+ Log . debug ( "have recurrences=" , curEvent . recurrences ) ;
224224 if ( curEvent . recurrences [ dateKey ] !== undefined ) {
225- Log . debug ( "[calendar] have a recurrence match for dateKey=" , dateKey ) ;
225+ Log . debug ( "have a recurrence match for dateKey=" , dateKey ) ;
226226 // We found an override, so for this recurrence, use a potentially different title, start date, and duration.
227227 curEvent = curEvent . recurrences [ dateKey ] ;
228228 // Some event start/end dates don't have timezones
@@ -237,12 +237,12 @@ const CalendarFetcherUtils = {
237237 recurringEventEndMoment = moment ( curEvent . end ) . tz ( CalendarFetcherUtils . getLocalTimezone ( ) ) ;
238238 }
239239 } else {
240- Log . debug ( "[calendar] recurrence key " , dateKey , " doesn't match" ) ;
240+ Log . debug ( "recurrence key " , dateKey , " doesn't match" ) ;
241241 }
242242 }
243243 // If there's no recurrence override, check for an exception date. Exception dates represent exceptions to the rule.
244244 if ( curEvent . exdate !== undefined ) {
245- Log . debug ( "[calendar] have datekey=" , dateKey , " exdates=" , curEvent . exdate ) ;
245+ Log . debug ( "have datekey=" , dateKey , " exdates=" , curEvent . exdate ) ;
246246 if ( curEvent . exdate [ dateKey ] !== undefined ) {
247247 // This date is an exception date, which means we should skip it in the recurrence pattern.
248248 showRecurrence = false ;
@@ -266,7 +266,7 @@ const CalendarFetcherUtils = {
266266 }
267267
268268 if ( showRecurrence === true ) {
269- Log . debug ( `[calendar] saving event: ${ recurrenceTitle } ` ) ;
269+ Log . debug ( `saving event: ${ recurrenceTitle } ` ) ;
270270 newEvents . push ( {
271271 title : recurrenceTitle ,
272272 startDate : recurringEventStartMoment . format ( "x" ) ,
@@ -280,7 +280,7 @@ const CalendarFetcherUtils = {
280280 description : description
281281 } ) ;
282282 } else {
283- Log . debug ( "[calendar] not saving event " , recurrenceTitle , eventStartMoment ) ;
283+ Log . debug ( "not saving event " , recurrenceTitle , eventStartMoment ) ;
284284 }
285285 }
286286 // End recurring event parsing.
0 commit comments