chore: slice long messages

This commit is contained in:
Miodec 2025-07-17 09:19:39 +02:00
parent b15520f0b3
commit c9986bbc4c

View file

@ -32,7 +32,13 @@ async function insertIntoDb(
if (!important) delete dbLog.important;
Logger.info(`${event}\t${uid}\t${JSON.stringify(message)}`);
const stringified = JSON.stringify(message);
Logger.info(
`${event}\t${uid}\t${
stringified.length > 100 ? stringified.slice(0, 100) + "..." : stringified
}`
);
await getLogsCollection().insertOne(dbLog);
}