mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-23 23:03:10 -06:00
Logging
This commit is contained in:
parent
77b1e91333
commit
a303600a9a
|
|
@ -369,15 +369,18 @@ func (t *txnReq) processEvent(ctx context.Context, e gomatrixserverlib.Event, is
|
||||||
|
|
||||||
// TODO: Make this less bad
|
// TODO: Make this less bad
|
||||||
for _, missingAuthEventID := range stateResp.MissingAuthEventIDs {
|
for _, missingAuthEventID := range stateResp.MissingAuthEventIDs {
|
||||||
|
logrus.WithContext(ctx).Infof("Retrieving missing auth event %q", missingAuthEventID)
|
||||||
if tx, err := t.federation.GetEvent(ctx, e.Origin(), missingAuthEventID); err == nil {
|
if tx, err := t.federation.GetEvent(ctx, e.Origin(), missingAuthEventID); err == nil {
|
||||||
ev, err := gomatrixserverlib.NewEventFromUntrustedJSON(tx.PDUs[0], stateResp.RoomVersion)
|
ev, err := gomatrixserverlib.NewEventFromUntrustedJSON(tx.PDUs[0], stateResp.RoomVersion)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.WithError(err).Warnf("Failed to unmarshal auth event %d", missingAuthEventID)
|
logrus.WithContext(ctx).WithError(err).Warnf("Failed to unmarshal auth event %d", missingAuthEventID)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if err = t.processEvent(ctx, ev, false); err != nil {
|
if err = t.processEvent(ctx, ev, false); err != nil {
|
||||||
logrus.WithError(err).Warnf("Failed to process auth event %d", missingAuthEventID)
|
logrus.WithContext(ctx).WithError(err).Warnf("Failed to process auth event %d", missingAuthEventID)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
logrus.WithContext(ctx).WithError(err).Warnf("Failed to retrieve unknown auth event %q", missingAuthEventID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue