Skip to content

Commit

Permalink
#166: Remove diagnostic logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Espen Norderud committed Oct 4, 2023
1 parent 1652069 commit df140f6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
4 changes: 0 additions & 4 deletions src/featureFlagging/frontend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,4 @@ const getTruthy = (paramValue: any): boolean => (
// Adding ' || !getIsProd()' turns the toggle on in non-prod environments.
export const toggleByURIParams = (searchParams: URLSearchParams) => {
flags.performances = getTruthy(searchParams.get("performances")) || !getIsProd();
console.log("Clientside getTruthy(searchParams.get(\"performances\")) =", getTruthy(searchParams.get("performances")));
console.log(" Clientside getIsProd() =", getIsProd());
console.log(" Clientside !getIsProd() =", !getIsProd());
console.log(" --> Clientside feature flag: performances =", flags.performances);
}
1 change: 0 additions & 1 deletion src/featureFlagging/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ let isProd = false;
let prodIsLogged = false;

export function parseIsProd(env: {PUBLIC_SANITY_DATASET: string}) {
console.log(env.PUBLIC_SANITY_DATASET);
isProd = (env.PUBLIC_SANITY_DATASET === 'prod' || env.PUBLIC_SANITY_DATASET === 'production');
if (!prodIsLogged) {
console.log("isProd:", isProd);
Expand Down
2 changes: 0 additions & 2 deletions src/routes/+layout.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import {parseIsProd, setServersideToggle, getIsProd} from "../featureFlagging/se

$: {
parseIsProd(env);

console.log("PUBLIC_FLAG_ALPHANUMERICSLUG:", env.PUBLIC_FLAG_ALPHANUMERICSLUG === "true");
setServersideToggle("strictAlphaNumericSlug", env.PUBLIC_FLAG_ALPHANUMERICSLUG === "true");
}

Expand Down

0 comments on commit df140f6

Please sign in to comment.