From 385bbec73f0e33b24de2453e9a3b13ccba162abb Mon Sep 17 00:00:00 2001 From: Neville Samuell Date: Fri, 11 Aug 2023 16:19:10 -0400 Subject: [PATCH] Reduce verbosity of privacy center logging further (#3915) --- CHANGELOG.md | 1 + clients/privacy-center/pages/api/fides-js.ts | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83a753ef92..7e72011bcb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ The types of changes are: ### Fixed - Fixed issue when generating masked values for invalid data paths (#3906)[https://github.com/ethyca/fides/pull/3906] - Code reload now works when running `nox -s dev` (#3914)[https://github.com/ethyca/fides/pull/3914] +- Reduce verbosity of privacy center logging further (#3915)[https://github.com/ethyca/fides/pull/3915] ## [2.18.0](https://github.com/ethyca/fides/compare/2.17.0...2.18.0) diff --git a/clients/privacy-center/pages/api/fides-js.ts b/clients/privacy-center/pages/api/fides-js.ts index b473e9ba7c..2fd4694dec 100644 --- a/clients/privacy-center/pages/api/fides-js.ts +++ b/clients/privacy-center/pages/api/fides-js.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ import { promises as fsPromises } from "fs"; import type { NextApiRequest, NextApiResponse } from "next"; import { CacheControl, stringify } from "cache-control-parser"; @@ -88,9 +87,12 @@ export default async function handler( }; const fidesConfigJSON = JSON.stringify(fidesConfig); - console.log( - "Bundling generic fides.js & Privacy Center configuration together..." - ); + if (process.env.NODE_ENV === "development") { + // eslint-disable-next-line no-console + console.log( + "Bundling generic fides.js & Privacy Center configuration together..." + ); + } const fidesJSBuffer = await fsPromises.readFile("public/lib/fides.js"); const fidesJS: string = fidesJSBuffer.toString(); if (!fidesJS || fidesJS === "") {