From a136902d58b11df28aa43a9dcf83110c4f788415 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sun, 21 May 2023 16:01:22 +0200 Subject: [PATCH] [eventsub] Add debug logging for subscribed topics Signed-off-by: Knut Ahlers --- pkg/twitch/eventsubWebsocketClient.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/twitch/eventsubWebsocketClient.go b/pkg/twitch/eventsubWebsocketClient.go index 85f5aa7..ab47082 100644 --- a/pkg/twitch/eventsubWebsocketClient.go +++ b/pkg/twitch/eventsubWebsocketClient.go @@ -6,6 +6,7 @@ import ( "io" "net" "reflect" + "strings" "time" "github.com/gorilla/websocket" @@ -393,6 +394,8 @@ func (e *EventSubSocketClient) subscribe() error { }); err != nil { return errors.Wrapf(err, "subscribing to %s/%s", st.Event, st.Version) } + + e.logger.WithField("topic", strings.Join([]string{st.Event, st.Version}, "/")).Debug("subscripted to topic") } return nil