aboutsummaryrefslogtreecommitdiff
path: root/syncapi
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2021-01-18 12:58:48 +0000
committerNeil Alexander <neilalexander@users.noreply.github.com>2021-01-18 12:58:48 +0000
commit534c29ab02e4566712bcc7eb9912b1a7a21e0ae4 (patch)
tree29032f7298a99e396ee43c59b1112ef03b91cfdd /syncapi
parentefc91146f0476239ac737c37ae8822346c415014 (diff)
Log event ID on consumer errors (fixes #1714)
Diffstat (limited to 'syncapi')
-rw-r--r--syncapi/consumers/roomserver.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/syncapi/consumers/roomserver.go b/syncapi/consumers/roomserver.go
index 1d47b73a..a8cc5f71 100644
--- a/syncapi/consumers/roomserver.go
+++ b/syncapi/consumers/roomserver.go
@@ -173,6 +173,7 @@ func (s *OutputRoomEventConsumer) onNewRoomEvent(
if err != nil {
// panic rather than continue with an inconsistent database
log.WithFields(log.Fields{
+ "event_id": ev.EventID(),
"event": string(ev.JSON()),
log.ErrorKey: err,
"add": msg.AddsStateEventIDs,
@@ -215,6 +216,7 @@ func (s *OutputRoomEventConsumer) onOldRoomEvent(
if err != nil {
// panic rather than continue with an inconsistent database
log.WithFields(log.Fields{
+ "event_id": ev.EventID(),
"event": string(ev.JSON()),
log.ErrorKey: err,
}).Panicf("roomserver output log: write old event failure")
@@ -276,6 +278,7 @@ func (s *OutputRoomEventConsumer) onNewInviteEvent(
if err != nil {
// panic rather than continue with an inconsistent database
log.WithFields(log.Fields{
+ "event_id": msg.Event.EventID(),
"event": string(msg.Event.JSON()),
"pdupos": pduPos,
log.ErrorKey: err,