More env settings to tune down log noise
2 files changed, 10 insertions, 8 deletions
diff --git a/src/api/routes/users/@me/settings-proto/1.ts b/src/api/routes/users/@me/settings-proto/1.ts
index 2ae3a55b..a0559c26 100644
--- a/src/api/routes/users/@me/settings-proto/1.ts
+++ b/src/api/routes/users/@me/settings-proto/1.ts
@@ -166,10 +166,11 @@ async function patchUserSettings(
};
}
- console.log(
- `Updating user settings for user ${userId} with atomic=${atomic}:`,
- updatedSettings,
- );
+ if ((process.env.LOG_PROTO_UPDATES || process.env.LOG_PROTO_SETTINGS_UPDATES) && process.env.LOG_PROTO_SETTINGS_UPDATES !== "false")
+ console.log(
+ `Updating user settings for user ${userId} with atomic=${atomic}:`,
+ updatedSettings,
+ );
if (!atomic) {
settings = PreloadedUserSettings.fromJson(
diff --git a/src/api/routes/users/@me/settings-proto/2.ts b/src/api/routes/users/@me/settings-proto/2.ts
index bfbcc81a..8335e219 100644
--- a/src/api/routes/users/@me/settings-proto/2.ts
+++ b/src/api/routes/users/@me/settings-proto/2.ts
@@ -168,10 +168,11 @@ async function patchUserSettings(
};
}
- console.log(
- `Updating frecency settings for user ${userId} with atomic=${atomic}:`,
- updatedSettings,
- );
+ if ((process.env.LOG_PROTO_UPDATES || process.env.LOG_PROTO_FRECENCY_UPDATES) && process.env.LOG_PROTO_FRECENCY_UPDATES !== "false")
+ console.log(
+ `Updating frecency settings for user ${userId} with atomic=${atomic}:`,
+ updatedSettings,
+ );
if (!atomic) {
settings = FrecencyUserSettings.fromJson(
|