Skip to content

Commit

Permalink
Only log loggable variables
Browse files Browse the repository at this point in the history
  • Loading branch information
eriksson-daniel committed Feb 13, 2025
1 parent d255737 commit e273117
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions server/src/plugins/crdt/collaboration-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,26 @@ export const collaborationServer = Server.configure({
logContext('Loaded state/update applied', context, 'debug');
},

onStoreDocument: async ({ context, document, ...rest }) => {
onStoreDocument: async ({
context,
document,
clientsCount,
documentName,
requestHeaders,
requestParameters,
socketId,
}) => {
if (!isConnectionContext(context)) {
secureLog.debug({
msg: 'Tried to store document without context',
data: {
document: JSON.stringify(getDocumentJson(document)),
context: JSON.stringify({ ...context, abortController: undefined }),
rest: JSON.stringify(rest),
clientsCount,
documentName,
requestHeaders: JSON.stringify(requestHeaders),
requestParameters: requestParameters.toString(),
socketId,
},
});

Expand Down

0 comments on commit e273117

Please sign in to comment.