From 72506a4055cf943d0f03992d360936e8be8d14e6 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sat, 21 Dec 2024 15:49:44 +0800 Subject: [PATCH] :loud_sound: Log sample of notifications --- pkg/internal/provider/caller.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/internal/provider/caller.go b/pkg/internal/provider/caller.go index f1594f0..933a2d1 100644 --- a/pkg/internal/provider/caller.go +++ b/pkg/internal/provider/caller.go @@ -2,11 +2,12 @@ package provider import ( "fmt" + "sync" + "time" + "git.solsynth.dev/hypernet/pusher/pkg/pushkit" "github.com/google/uuid" "github.com/rs/zerolog/log" - "sync" - "time" ) var notifyProviders = make(map[string]NotificationProvider) @@ -22,6 +23,7 @@ func PushNotification(in pushkit.NotificationPushRequest) error { Str("provider", in.Provider). Str("topic", in.Notification.Topic). Str("request_id", requestId). + Any("body", in.Notification). Msg("Pushing notification...") prov, ok := notifyProviders[in.Provider] @@ -60,6 +62,7 @@ func PushNotificationBatch(in pushkit.NotificationPushBatchRequest) { Any("tk", in.Tokens). Any("providers", in.Providers). Str("topic", in.Notification.Topic). + Any("body", in.Notification). Str("request_id", requestId). Msg("Pushing notification in batch...")