summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-10-19 08:59:32 +0200
committerRory& <root@rory.gay>2025-10-19 08:59:32 +0200
commit20177860e0a99ca0e5865393cac53f2d5a5f5d6a (patch)
treeac1dba2dcedf06b7da4b4634cafc5f99938510d6 /src/api
parentAlways mutate opts, not message (diff)
downloadserver-ts-20177860e0a99ca0e5865393cac53f2d5a5f5d6a.tar.xz
More env settings to tune down log noise
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/users/@me/settings-proto/1.ts9
-rw-r--r--src/api/routes/users/@me/settings-proto/2.ts9
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(