Log event ID on consumer errors (fixes #1714)

This commit is contained in:
Neil Alexander 2021-01-18 12:58:48 +00:00
parent efc91146f0
commit 534c29ab02
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 4 additions and 0 deletions

View file

@ -102,6 +102,7 @@ func (s *OutputRoomEventConsumer) onMessage(msg *sarama.ConsumerMessage) error {
default:
// panic rather than continue with an inconsistent database
log.WithFields(log.Fields{
"event_id": ev.EventID(),
"event": string(ev.JSON()),
"add": output.NewRoomEvent.AddsStateEventIDs,
"del": output.NewRoomEvent.RemovesStateEventIDs,