Problem/Motivation
When entity updates result in JSON object data sending a POST request to the Gatsby preview and incremental build servers, I would like to see what JSON object data is being sent. Having log messages created will help diagnose any issues that have occurred on the Gatsby servers.
Steps to reproduce
N/A
Proposed resolution
- Create a new checkbox field in the admin settings to turn on JSON logging so it's configurable and can be turned off when in production environments.
- When the checkbox field is enabled in admin settings, then that turns on logging in GatsbyPreview file to log any JSON object data that is sent with the POST request to the Gatsby servers.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | gatsby-n3206524-10.interdiff.txt | 1.22 KB | damienmckenna |
| #9 | gatsby-n3206524-9.patch | 3.11 KB | damienmckenna |
| #9 | gatsby-n3206524-9.interdiff.txt | 1.05 KB | damienmckenna |
| #4 | gatsby-log-json-3206524-4.patch | 2.87 KB | iansholtys |
| #3 | 3206524-2.patch | 2.84 KB | brittany.huntzberry |
Comments
Comment #2
larowlanI'm inclined to say if this is for local only then attaching a debugger should suffice.
My main concern is putting sensitive content into logs, e.g. content that the user may not normally see.
Comment #3
brittany.huntzberryCreated a patch with proposed changes.
Comment #4
iansholtys commentedRerolled patch for those who might get some value from it. It can be useful for strategic debugging.
Comment #5
gdmartinezsandino commentedThis needs to be verified.
Comment #6
damienmckennaComment #7
damienmckennaComment #8
damienmckennaI think it'd be useful to add some verbiage in the admin to warn of security implications of this setting.
Comment #9
damienmckennaHow about this?
Comment #10
damienmckennaI think one more sentence would be useful.
Comment #12
damienmckennaCommitted.
Comment #13
damienmckenna