From 244e86703c965a99d136f4bb82cde17d086dee1e Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 2 Aug 2022 16:03:55 +0100 Subject: [PATCH] More logging --- roomserver/internal/input/input_missing.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roomserver/internal/input/input_missing.go b/roomserver/internal/input/input_missing.go index 5a871738a..97d7faa7a 100644 --- a/roomserver/internal/input/input_missing.go +++ b/roomserver/internal/input/input_missing.go @@ -326,8 +326,10 @@ func (t *missingStateReq) lookupStateAfterEvent(ctx context.Context, roomVersion return respState, true, nil } + logrus.WithContext(ctx).Warnf("State for event %s not available locally, falling back to federation (via %d servers)", eventID, len(t.servers)) respState, err := t.lookupStateBeforeEvent(ctx, roomVersion, roomID, eventID) if err != nil { + logrus.WithContext(ctx).WithError(err).Errorf("Failed to look up state before event %s", eventID) return nil, false, fmt.Errorf("t.lookupStateBeforeEvent: %w", err) } @@ -339,6 +341,7 @@ func (t *missingStateReq) lookupStateAfterEvent(ctx context.Context, roomVersion case nil: // do nothing default: + logrus.WithContext(ctx).WithError(err).Errorf("Failed to look up event %s", eventID) return nil, false, fmt.Errorf("t.lookupEvent: %w", err) } h = t.cacheAndReturn(h)