From e7abdc020ea0eb486427f8aec9485b5f426e237e Mon Sep 17 00:00:00 2001 From: Daniil Zavyalov Date: Thu, 7 Mar 2024 17:02:02 +0600 Subject: [PATCH] [+] add notification logging --- .../notifications/routes/CalendarNotificationsRouting.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/effectiveOfficeBackend/src/main/kotlin/office/effective/features/notifications/routes/CalendarNotificationsRouting.kt b/effectiveOfficeBackend/src/main/kotlin/office/effective/features/notifications/routes/CalendarNotificationsRouting.kt index 9317ec37b..3480ee50e 100644 --- a/effectiveOfficeBackend/src/main/kotlin/office/effective/features/notifications/routes/CalendarNotificationsRouting.kt +++ b/effectiveOfficeBackend/src/main/kotlin/office/effective/features/notifications/routes/CalendarNotificationsRouting.kt @@ -3,10 +3,13 @@ package office.effective.features.notifications.routes import io.github.smiley4.ktorswaggerui.dsl.route import io.ktor.http.* import io.ktor.server.application.* +import io.ktor.server.request.* import io.ktor.server.response.* import io.ktor.server.routing.* +import office.effective.common.notifications.FcmNotificationSender import office.effective.common.notifications.INotificationSender import org.koin.core.context.GlobalContext +import org.slf4j.LoggerFactory /** * Route for Google calendar push notifications @@ -16,6 +19,8 @@ fun Route.calendarNotificationsRouting() { val messageSender: INotificationSender = GlobalContext.get().get() post() { + val logger = LoggerFactory.getLogger(FcmNotificationSender::class.java) + logger.info("[calendarNotificationsRouting] received push notification: \n{}", call.receive()) messageSender.sendEmptyMessage("booking") call.respond(HttpStatusCode.OK) }