Restrict Privacy Center debug logging to development-only #3638
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #3637
Code Changes
console.log
statements in Privacy Center code with aNODE_ENV == "development"
guardSteps to Confirm
turbo dev
and confirm the "Load Privacy Center environment...", "Loaded configuration file.." logs are still present locallynox -s "fides_env(test)"
and confirm Privacy Center logs are quietTest Results: Development
Test Results: Production
Pre-Merge Checklist
CHANGELOG.md
Description Of Changes
I personally added some troubleshooting logs to the Privacy Center backend for loading config files, but didn't really think them through - these fire on every request, so we really can't log anything for "normal" troubleshooting!
NextJS doesn't have thorough support for log levels like DEBUG/INFO/WARN/etc., so that kind of "normal" solution doesn't apply here, so I'm just disabling the logs based on the NODE_ENV instead.