Skip to content

Commit e7abdc0

Browse files
[+] add notification logging
1 parent 921aee6 commit e7abdc0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

effectiveOfficeBackend/src/main/kotlin/office/effective/features/notifications/routes/CalendarNotificationsRouting.kt

+5
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ package office.effective.features.notifications.routes
33
import io.github.smiley4.ktorswaggerui.dsl.route
44
import io.ktor.http.*
55
import io.ktor.server.application.*
6+
import io.ktor.server.request.*
67
import io.ktor.server.response.*
78
import io.ktor.server.routing.*
9+
import office.effective.common.notifications.FcmNotificationSender
810
import office.effective.common.notifications.INotificationSender
911
import org.koin.core.context.GlobalContext
12+
import org.slf4j.LoggerFactory
1013

1114
/**
1215
* Route for Google calendar push notifications
@@ -16,6 +19,8 @@ fun Route.calendarNotificationsRouting() {
1619
val messageSender: INotificationSender = GlobalContext.get().get()
1720

1821
post() {
22+
val logger = LoggerFactory.getLogger(FcmNotificationSender::class.java)
23+
logger.info("[calendarNotificationsRouting] received push notification: \n{}", call.receive<String>())
1924
messageSender.sendEmptyMessage("booking")
2025
call.respond(HttpStatusCode.OK)
2126
}

0 commit comments

Comments
 (0)