From f8c98bf6bf10d8ec39731e6d3c2ac56e447bab19 Mon Sep 17 00:00:00 2001 From: Owen Date: Fri, 16 Jan 2026 12:19:52 -0800 Subject: [PATCH] Fix log messages --- server/lib/cleanupLogs.ts | 1 + server/routers/olm/handleOlmPingMessage.ts | 8 ++++---- server/routers/olm/sync.ts | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/server/lib/cleanupLogs.ts b/server/lib/cleanupLogs.ts index 7cdd6e3e..9e97525d 100644 --- a/server/lib/cleanupLogs.ts +++ b/server/lib/cleanupLogs.ts @@ -26,6 +26,7 @@ export function initLogCleanupInterval() { ) ); + // TODO: handle when there are multiple nodes doing this clearing using redis for (const org of orgsToClean) { const { orgId, diff --git a/server/routers/olm/handleOlmPingMessage.ts b/server/routers/olm/handleOlmPingMessage.ts index 635342d8..359da3c9 100644 --- a/server/routers/olm/handleOlmPingMessage.ts +++ b/server/routers/olm/handleOlmPingMessage.ts @@ -171,17 +171,17 @@ export const handleOlmPingMessage: MessageHandler = async (context) => { } // get the version - logger.debug(`++++++++++++++++++++++++++++handleOlmPingMessage: About to get config version for olmId: ${olm.olmId}`); + logger.debug(`handleOlmPingMessage: About to get config version for olmId: ${olm.olmId}`); const configVersion = await getClientConfigVersion(olm.olmId); - logger.debug(`++++++++++++++++++++++++++++handleOlmPingMessage: Got config version: ${configVersion} (type: ${typeof configVersion})`); + logger.debug(`handleOlmPingMessage: Got config version: ${configVersion} (type: ${typeof configVersion})`); if (configVersion == null || configVersion === undefined) { - logger.debug(`++++++++++++++++++++++++++++handleOlmPingMessage: could not get config version from server for olmId: ${olm.olmId}`) + logger.debug(`handleOlmPingMessage: could not get config version from server for olmId: ${olm.olmId}`) } if (message.configVersion != null && configVersion != null && configVersion != message.configVersion) { logger.debug( - `++++++++++++++++++++++++++++handleOlmPingMessage: Olm ping with outdated config version: ${message.configVersion} (current: ${configVersion})` + `handleOlmPingMessage: Olm ping with outdated config version: ${message.configVersion} (current: ${configVersion})` ); await sendOlmSyncMessage(olm, client); } diff --git a/server/routers/olm/sync.ts b/server/routers/olm/sync.ts index 293f11b7..6147919c 100644 --- a/server/routers/olm/sync.ts +++ b/server/routers/olm/sync.ts @@ -66,7 +66,7 @@ export async function sendOlmSyncMessage(olm: Olm, client: Client) { }); } - logger.debug("++++++++++++++++++++++++++++sendOlmSyncMessage: sending sync message") + logger.debug("sendOlmSyncMessage: sending sync message") await sendToClient(olm.olmId, { type: "olm/sync", @@ -77,4 +77,4 @@ export async function sendOlmSyncMessage(olm: Olm, client: Client) { }).catch((error) => { logger.warn(`Error sending olm sync message:`, error); }); -} \ No newline at end of file +}