mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
Debug logging
This commit is contained in:
parent
65f31dc5f6
commit
517e4b8411
2 changed files with 5 additions and 0 deletions
|
@ -5,6 +5,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/matrix-org/gomatrixserverlib"
|
"github.com/matrix-org/gomatrixserverlib"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Functions here are "proxying" calls to the gomatrixserverlib federation
|
// Functions here are "proxying" calls to the gomatrixserverlib federation
|
||||||
|
@ -157,6 +158,7 @@ func (a *FederationInternalAPI) MSC2836EventRelationships(
|
||||||
ctx, cancel := context.WithTimeout(ctx, time.Minute)
|
ctx, cancel := context.WithTimeout(ctx, time.Minute)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
ires, err := a.doRequestIfNotBlacklisted(s, func() (interface{}, error) {
|
ires, err := a.doRequestIfNotBlacklisted(s, func() (interface{}, error) {
|
||||||
|
logrus.Infof("FederationInternalAPI calling MSC2836EventRelationships on %s", s)
|
||||||
return a.federation.MSC2836EventRelationships(ctx, s, r, roomVersion)
|
return a.federation.MSC2836EventRelationships(ctx, s, r, roomVersion)
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -36,6 +36,7 @@ import (
|
||||||
userapi "github.com/matrix-org/dendrite/userapi/api"
|
userapi "github.com/matrix-org/dendrite/userapi/api"
|
||||||
"github.com/matrix-org/gomatrixserverlib"
|
"github.com/matrix-org/gomatrixserverlib"
|
||||||
"github.com/matrix-org/util"
|
"github.com/matrix-org/util"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -342,6 +343,7 @@ func (rc *reqCtx) fetchUnknownEvent(eventID, roomID string) *gomatrixserverlib.H
|
||||||
logger.WithError(err).Error("failed to QueryJoinedHostServerNamesInRoom")
|
logger.WithError(err).Error("failed to QueryJoinedHostServerNamesInRoom")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
logger.Infof("::DEBUG:: QueryJoinedHostServerNamesInRoom %v", queryRes.ServerNames)
|
||||||
// query up to 5 servers
|
// query up to 5 servers
|
||||||
serversToQuery := queryRes.ServerNames
|
serversToQuery := queryRes.ServerNames
|
||||||
if len(serversToQuery) > 5 {
|
if len(serversToQuery) > 5 {
|
||||||
|
@ -477,6 +479,7 @@ func (rc *reqCtx) MSC2836EventRelationships(eventID string, srv gomatrixserverli
|
||||||
MaxDepth: rc.req.MaxDepth,
|
MaxDepth: rc.req.MaxDepth,
|
||||||
RecentFirst: rc.req.RecentFirst,
|
RecentFirst: rc.req.RecentFirst,
|
||||||
}, ver)
|
}, ver)
|
||||||
|
logrus.Infof("::DEBUG:: fedinternal calling MSC2836EventRelationships %+v err=%v", res, err)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
util.GetLogger(rc.ctx).WithError(err).Error("Failed to call MSC2836EventRelationships")
|
util.GetLogger(rc.ctx).WithError(err).Error("Failed to call MSC2836EventRelationships")
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in a new issue