diff options
author | Kegsay <kegan@matrix.org> | 2020-03-09 14:37:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-09 14:37:51 +0000 |
commit | cdc115778551af69b4c9c39f758adcae61701aa3 (patch) | |
tree | c8e34df17c9ee61de48ad8a32d0d99b71941604d /clientapi/routing/sendevent.go | |
parent | c31cb0227111ab4441d6282081ebd6494a422ba8 (diff) |
Improve logging when sending events (#883)
We have some failing sytests on sqlite but it's very difficult to debug
due to lack of useful logging. This adds a log line for when a new event
is sent (incl. logging the event ID) as well as adding a user_id field
for all contextual logs so we know who initiated certain actions.
Diffstat (limited to 'clientapi/routing/sendevent.go')
-rw-r--r-- | clientapi/routing/sendevent.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clientapi/routing/sendevent.go b/clientapi/routing/sendevent.go index 47ad1882..da96c5c6 100644 --- a/clientapi/routing/sendevent.go +++ b/clientapi/routing/sendevent.go @@ -77,6 +77,7 @@ func SendEvent( util.GetLogger(req.Context()).WithError(err).Error("producer.SendEvents failed") return jsonerror.InternalServerError() } + util.GetLogger(req.Context()).WithField("event_id", eventID).Info("Sent event") res := util.JSONResponse{ Code: http.StatusOK, |