mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-29 01:33:10 -06:00
Producer logging
This commit is contained in:
parent
f4cc3d28e6
commit
f04bba4170
|
|
@ -19,6 +19,7 @@ import (
|
||||||
|
|
||||||
"github.com/Shopify/sarama"
|
"github.com/Shopify/sarama"
|
||||||
"github.com/matrix-org/dendrite/eduserver/api"
|
"github.com/matrix-org/dendrite/eduserver/api"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
type SigningKeyUpdate struct {
|
type SigningKeyUpdate struct {
|
||||||
|
|
@ -46,6 +47,12 @@ func (p *SigningKeyUpdate) ProduceSigningKeyUpdate(key api.SigningKeyUpdate) err
|
||||||
m.Value = sarama.ByteEncoder(value)
|
m.Value = sarama.ByteEncoder(value)
|
||||||
|
|
||||||
_, _, err = p.Producer.SendMessage(&m)
|
_, _, err = p.Producer.SendMessage(&m)
|
||||||
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logrus.WithFields(logrus.Fields{
|
||||||
|
"user_id": key.UserID,
|
||||||
|
}).Infof("Produced to cross-signing update topic '%s'", p.Topic)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue