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.

Comments

brittany.huntzberry created an issue. See original summary.

larowlan’s picture

I'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.

brittany.huntzberry’s picture

StatusFileSize
new2.84 KB

Created a patch with proposed changes.

iansholtys’s picture

StatusFileSize
new2.87 KB

Rerolled patch for those who might get some value from it. It can be useful for strategic debugging.

gdmartinezsandino’s picture

Status: Active » Needs review

This needs to be verified.

damienmckenna’s picture

Assigned: brittany.huntzberry » Unassigned
damienmckenna’s picture

damienmckenna’s picture

Status: Needs review » Needs work

I think it'd be useful to add some verbiage in the admin to warn of security implications of this setting.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new1.05 KB
new3.11 KB

How about this?

damienmckenna’s picture

StatusFileSize
new1.22 KB

I think one more sentence would be useful.

damienmckenna’s picture

Status: Needs review » Fixed

Committed.

damienmckenna’s picture

Version: 8.x-1.x-dev » 2.0.x-dev

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.