More env settings to tune down log noise

This commit is contained in:
Rory& 2025-10-19 08:59:32 +02:00
parent 4fa95a928b
commit 20177860e0
3 changed files with 11 additions and 9 deletions

View File

@ -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(

View File

@ -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(

View File

@ -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) : "");
}