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( diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts index 82b72f68..d304bc24 100644 --- a/src/gateway/opcodes/Identify.ts +++ b/src/gateway/opcodes/Identify.ts @@ -704,5 +704,5 @@ export async function onIdentify(this: WebSocket, data: Payload) { const setupListenerTime = Date.now(); - console.log(`[Gateway] IDENTIFY ${this.user_id} in ${totalSw.elapsed().totalMilliseconds}ms`, JSON.stringify(d._trace, null, 2)); + console.log(`[Gateway] IDENTIFY ${this.user_id} in ${totalSw.elapsed().totalMilliseconds}ms`, process.env.LOG_GATEWAY_TRACES ? JSON.stringify(d._trace, null, 2) : ""); }