feat(db): extra log

This commit is contained in:
Alexander 2025-05-27 11:16:43 +02:00
parent 59c10cdbea
commit 3673a02483

View file

@ -732,13 +732,14 @@ func (c *connectorImpl) InsertCustom(session *sessions.Session, msg *messages.Cu
if err != nil {
return fmt.Errorf("can't marshal custom event: %s", err)
}
var customPayload interface{}
customPayload := make(map[string]interface{})
if err := json.Unmarshal([]byte(msg.Payload), &customPayload); err != nil {
log.Printf("can't unmarshal custom event payload into object: %s", err)
customPayload = map[string]interface{}{
"payload": msg.Payload,
}
}
log.Printf("custom event's payload: %s", customPayload)
eventTime := datetime(msg.Timestamp)
if err := c.batches["custom"].Append(