Structured logging

This commit is contained in:
Kegan Dougal 2020-03-16 17:23:54 +00:00
parent ec44c91f0e
commit ff1c0a3536

View file

@ -116,7 +116,7 @@ func (t *txnReq) processTransaction() (*gomatrixserverlib.RespSend, error) {
results[e.EventID()] = gomatrixserverlib.PDUResult{
Error: err.Error(),
}
util.GetLogger(t.context).Error("Failed to process incoming federation event, skipping. Event ID:", e.EventID(), " Err:", err)
util.GetLogger(t.context).WithError(err).WithField("event_id", e.EventID()).Warn("Failed to process incoming federation event, skipping it.")
} else {
results[e.EventID()] = gomatrixserverlib.PDUResult{}
}