Skip to content

Commit

Permalink
add more debugging to neuronjson POST
Browse files Browse the repository at this point in the history
  • Loading branch information
DocSavage committed Mar 30, 2024
1 parent 3ef3d30 commit 9163390
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions datatype/neuronjson/neuronjson.go
Original file line number Diff line number Diff line change
Expand Up @@ -1357,11 +1357,12 @@ func (d *Data) storeAndUpdate(ctx *datastore.VersionedCtx, keyStr string, newDat
if _, found := newData["bodyid_time"]; found {
return fmt.Errorf("'bodyid_time' field not allowed")
}
rcvJSON, _ := json.Marshal(newData)
updateJSON(origData, newData, ctx.User, conditionals, replace)
origJSON, _ := json.Marshal(origData)
newJSON, _ := json.Marshal(newData)
dvid.Infof("neuronjson %s put by user %q, conditionals %v, replace %t:\nOrig: %s\n New: %s\n",
d.DataName(), ctx.User, conditionals, replace, origJSON, newJSON)
dvid.Infof("neuronjson %s put by user %q, conditionals %v, replace %t:\nOrig: %s\n Rcv: %s\n New: %s\n",
d.DataName(), ctx.User, conditionals, replace, origJSON, rcvJSON, newJSON)

// write result
mdb, found := d.getMemDBbyVersion(ctx.VersionID())
Expand Down

0 comments on commit 9163390

Please sign in to comment.