From 6fb63088376e996250946708e59a349c956598d7 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Dec 21 2018 14:30:38 +0000 Subject: Start adding some logging to fedocal Signed-off-by: Pierre-Yves Chibon --- diff --git a/fedocal/fedocallib/__init__.py b/fedocal/fedocallib/__init__.py index 9f4f703..660f9a7 100644 --- a/fedocal/fedocallib/__init__.py +++ b/fedocal/fedocallib/__init__.py @@ -16,6 +16,7 @@ license. from __future__ import unicode_literals, absolute_import, print_function import copy +import logging import operator from datetime import datetime from datetime import date @@ -43,6 +44,8 @@ from fedocal.fedocallib.fedora_calendar import FedocalCalendar from fedocal.fedocal_babel import gettext +_log = logging.getLogger(__name__) + HOURS = ['00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', @@ -1166,6 +1169,7 @@ def add_vcal_file(session, calendar, stream, fas_user, admin=False): """ Add the meetings from the iCalendar stream provided into the calendar specified. """ + _log.info('Uploading a vCal file') # Build a dict with all the common timezones storing for each their # localize name and their offset (ie: CEST 2:00:00) timezone_lookup = dict() @@ -1240,6 +1244,11 @@ def add_vcal_file(session, calendar, stream, fas_user, admin=False): meeting_time_stop = meeting_date_end.time() meeting_date_end = meeting_date_end.date() + _log.info('Add meeting: {} - Start: {}:{} - End: {}:{}'.format( + meeting_name, meeting_date, meeting_time_start, + meeting_date_end, meeting_time_stop + )) + add_meeting( session, calendarobj=calendar,