mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-30 04:52:46 +00:00
Tweak some logging (#2130)
* Modify some log levels * Update gomatrixserverlib to matrix-org/gomatrixserverlib@336334f * Update gomatrixserverlib to matrix-org/gomatrixserverlib@cde7ac8 * Demote warning about key change producer * Add more useful roomserver logging * Further tweaking
This commit is contained in:
parent
eb8e770e99
commit
ba1a9b98b7
13 changed files with 77 additions and 57 deletions
|
@ -60,7 +60,7 @@ func (r *Inviter) PerformInvite(
|
|||
"room_version": req.RoomVersion,
|
||||
"target_user_id": targetUserID,
|
||||
"room_info_exists": info != nil,
|
||||
}).Info("processing invite event")
|
||||
}).Debug("processing invite event")
|
||||
|
||||
_, domain, _ := gomatrixserverlib.SplitID('@', targetUserID)
|
||||
isTargetLocal := domain == r.Cfg.Matrix.ServerName
|
||||
|
|
|
@ -53,6 +53,11 @@ func (r *Joiner) PerformJoin(
|
|||
) {
|
||||
roomID, joinedVia, err := r.performJoin(ctx, req)
|
||||
if err != nil {
|
||||
logrus.WithContext(ctx).WithFields(logrus.Fields{
|
||||
"room_id": req.RoomIDOrAlias,
|
||||
"user_id": req.UserID,
|
||||
"servers": req.ServerNames,
|
||||
}).WithError(err).Error("Failed to join room")
|
||||
sentry.CaptureException(err)
|
||||
perr, ok := err.(*rsAPI.PerformError)
|
||||
if ok {
|
||||
|
|
|
@ -27,6 +27,7 @@ import (
|
|||
"github.com/matrix-org/dendrite/setup/config"
|
||||
"github.com/matrix-org/gomatrixserverlib"
|
||||
"github.com/matrix-org/util"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
type Leaver struct {
|
||||
|
@ -51,7 +52,14 @@ func (r *Leaver) PerformLeave(
|
|||
return nil, fmt.Errorf("user %q does not belong to this homeserver", req.UserID)
|
||||
}
|
||||
if strings.HasPrefix(req.RoomID, "!") {
|
||||
return r.performLeaveRoomByID(ctx, req, res)
|
||||
output, err := r.performLeaveRoomByID(ctx, req, res)
|
||||
if err != nil {
|
||||
logrus.WithContext(ctx).WithFields(logrus.Fields{
|
||||
"room_id": req.RoomID,
|
||||
"user_id": req.UserID,
|
||||
}).WithError(err).Error("Failed to leave room")
|
||||
}
|
||||
return output, err
|
||||
}
|
||||
return nil, fmt.Errorf("room ID %q is invalid", req.RoomID)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue