mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-09-05 22:28:01 +08:00
chore: slice long messages
This commit is contained in:
parent
b15520f0b3
commit
c9986bbc4c
1 changed files with 7 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue