Skip to content

Commit

Permalink
Collaboration: Adjust log levels
Browse files Browse the repository at this point in the history
  • Loading branch information
cskrov committed Oct 29, 2024
1 parent 7de7ce4 commit 9d5fa58
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions server/src/plugins/crdt/collaboration-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ export const collaborationServer = Server.configure({
}

// navIdent is not defined when server is run without Wonderwall (ie. locally).
logContext(`Collaboration connection established for ${context.navIdent}!`, context);
logContext(`Collaboration connection established for ${context.navIdent}!`, context, 'debug');

context.abortController = new AbortController();

const oboToken = await oboCache.get(getCacheKey(context.navIdent, ApiClientEnum.KABAL_API));

if (oboToken === null) {
logContext('Collaboration connection established without OBO token, refreshing OBO token now.', context, 'warn');
logContext('Collaboration connection established without OBO token, refreshing OBO token now.', context, 'debug');

// Refresh OBO token immediately if it's missing or invalid.
await refreshNow(context);
Expand Down Expand Up @@ -160,7 +160,7 @@ export const collaborationServer = Server.configure({
logContext(
`Collaboration connection established with OBO token expiring in ${expiresIn} seconds, refreshing OBO token now.`,
context,
'warn',
'debug',
);

// Refresh OBO token immediately if it's about to expire.
Expand All @@ -172,15 +172,15 @@ export const collaborationServer = Server.configure({
logContext(
`Collaboration connection established with OBO token expiring in ${expiresIn}, starting OBO token refresh interval.`,
context,
'warn',
'debug',
);
startRefreshOboTokenInterval(context);
},

onDisconnect: async ({ context }) => {
if (isConnectionContext(context)) {
// navIdent is not defined locally.
logContext(`Collaboration connection closed for ${context.navIdent}!`, context);
logContext(`Collaboration connection closed for ${context.navIdent}!`, context, 'debug');

context.abortController?.abort();
} else {
Expand Down

0 comments on commit 9d5fa58

Please sign in to comment.