Skip to content

Commit ff9284a

Browse files
committed
feat: add INFO level logging for Jetstream events
1 parent a5e2832 commit ff9284a

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

internal/jetstream/consumer.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,19 @@ func (c *Consumer) processEvents(ctx context.Context) {
135135
for event := range c.client.Events() {
136136
c.statsMu.Lock()
137137
c.stats.EventsReceived++
138+
eventCount := c.stats.EventsReceived
138139
c.statsMu.Unlock()
139140

141+
// Log every event received (for debugging)
142+
if event.IsCommit() {
143+
slog.Info("[jetstream] Event received",
144+
"collection", event.Commit.Collection,
145+
"operation", event.Commit.Operation,
146+
"did", event.DID,
147+
"total_events", eventCount,
148+
)
149+
}
150+
140151
// Update cursor
141152
c.cursorMu.Lock()
142153
c.cursor = event.TimeUS
@@ -194,9 +205,9 @@ func (c *Consumer) handleCommit(ctx context.Context, event *Event) error {
194205
}
195206
c.pubsub.PublishRecord(eventType, uri, commit.CID, event.DID, commit.Collection, commit.Record)
196207

197-
slog.Debug("Stored record",
208+
slog.Info("[jetstream] Stored record",
198209
"uri", uri,
199-
"cid", commit.CID,
210+
"collection", commit.Collection,
200211
"operation", commit.Operation,
201212
)
202213

0 commit comments

Comments
 (0)