aboutsummaryrefslogtreecommitdiff
path: root/roomserver/internal/perform/perform_join.go
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-01-31 16:01:54 +0000
committerNeil Alexander <neilalexander@users.noreply.github.com>2022-01-31 16:01:54 +0000
commit893aa3b1414f46a44900e7377b5b471cb2aff0f3 (patch)
treea5a9dbfe0b0428205c6fa3f168e3e8c8defe696f /roomserver/internal/perform/perform_join.go
parent07d0e72a8b2fd48cac50026346be4810c5768d36 (diff)
More logging tweaks
Diffstat (limited to 'roomserver/internal/perform/perform_join.go')
-rw-r--r--roomserver/internal/perform/perform_join.go14
1 files changed, 9 insertions, 5 deletions
diff --git a/roomserver/internal/perform/perform_join.go b/roomserver/internal/perform/perform_join.go
index dfa21bcb..9d2a66d4 100644
--- a/roomserver/internal/perform/perform_join.go
+++ b/roomserver/internal/perform/perform_join.go
@@ -51,13 +51,15 @@ func (r *Joiner) PerformJoin(
req *rsAPI.PerformJoinRequest,
res *rsAPI.PerformJoinResponse,
) {
+ logger := logrus.WithContext(ctx).WithFields(logrus.Fields{
+ "room_id": req.RoomIDOrAlias,
+ "user_id": req.UserID,
+ "servers": req.ServerNames,
+ })
+ logger.Info("User requested to room join")
roomID, joinedVia, err := r.performJoin(context.Background(), 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")
+ logger.WithError(err).Error("Failed to join room")
sentry.CaptureException(err)
perr, ok := err.(*rsAPI.PerformError)
if ok {
@@ -67,7 +69,9 @@ func (r *Joiner) PerformJoin(
Msg: err.Error(),
}
}
+ return
}
+ logger.Info("User joined room successfully")
res.RoomID = roomID
res.JoinedVia = joinedVia
}