Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict Privacy Center debug logging to development-only #3638

Merged
merged 2 commits into from
Jun 21, 2023

Conversation

NevilleS
Copy link
Contributor

@NevilleS NevilleS commented Jun 21, 2023

Closes #3637

Code Changes

  • Wrap remaining console.log statements in Privacy Center code with a NODE_ENV == "development" guard

Steps to Confirm

  • Run turbo dev and confirm the "Load Privacy Center environment...", "Loaded configuration file.." logs are still present locally
  • Run nox -s "fides_env(test)" and confirm Privacy Center logs are quiet

Test Results: Development

image

Test Results: Production

image

Pre-Merge Checklist

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.

@RobertKeyser
Copy link
Contributor

Approved, but in the future it might be good to use either an enum or const for the env "development". That can be a future improvement though.

@cypress
Copy link

cypress bot commented Jun 21, 2023

Passing run #2835 ↗︎

0 4 0 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

Merge f3eb293 into f20e299...
Project: fides Commit: 5aa2e9fc8c ℹ️
Status: Passed Duration: 00:50 💡
Started: Jun 21, 2023 3:02 PM Ended: Jun 21, 2023 3:03 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@NevilleS NevilleS merged commit 4c5b9a2 into main Jun 21, 2023
@NevilleS NevilleS deleted the ns-reduce-privacy-center-logging branch June 21, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Privacy Center logging is too verbose
2 participants