Summary
The output of wt printlog -u looks like JSON, but it is not actually a valid, machine-parsable JSON document. For example, here is a sample log record for row_put:
{ "optype": "row_put",
"fileid": 0 0x0,
"key": "file:table.wt\u0000",
"value": "(redacted)"
},
The fileid field is not a valid JSON, as its value is printed twice: first as a regular integer and then as a hex.
Suggested solution
If we would like to keep the hex output, we can store it in a separate string field:
{ "optype": "row_put",
"fileid": 0,
"fileid-hex": "0x0",
"key": "file:table.wt\u0000",
"value": "(redacted)"
},
This would follow our precedent in printing values in hex, which use a separate value-hex field.
We should be able to do this as a small change to dist/log.py, which generates src/log/log_auto.c. After that, we should look for any more instances of improper JSON.