aboutsummaryrefslogtreecommitdiff
path: root/clientapi/producers/syncapi.go
diff options
context:
space:
mode:
Diffstat (limited to 'clientapi/producers/syncapi.go')
-rw-r--r--clientapi/producers/syncapi.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/clientapi/producers/syncapi.go b/clientapi/producers/syncapi.go
index 244a61dc..375b1eee 100644
--- a/clientapi/producers/syncapi.go
+++ b/clientapi/producers/syncapi.go
@@ -17,9 +17,9 @@ package producers
import (
"encoding/json"
- "github.com/matrix-org/dendrite/internal"
-
"github.com/Shopify/sarama"
+ "github.com/matrix-org/dendrite/internal"
+ log "github.com/sirupsen/logrus"
)
// SyncAPIProducer produces events for the sync API server to consume
@@ -44,6 +44,11 @@ func (p *SyncAPIProducer) SendData(userID string, roomID string, dataType string
m.Topic = string(p.Topic)
m.Key = sarama.StringEncoder(userID)
m.Value = sarama.ByteEncoder(value)
+ log.WithFields(log.Fields{
+ "user_id": userID,
+ "room_id": roomID,
+ "data_type": dataType,
+ }).Infof("Producing to topic '%s'", p.Topic)
_, _, err = p.Producer.SendMessage(&m)
return err