mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-15 16:37:28 +00:00
[real-time] only log userId from session (#24281)
While we are at it, log projectId and transport. GitOrigin-RevId: ac10220247947e0050f1374c81091c50c8cc0e85
This commit is contained in:
parent
2d48c86e61
commit
8d569815e6
1 changed files with 14 additions and 12 deletions
|
@ -216,18 +216,6 @@ module.exports = Router = {
|
|||
})
|
||||
metrics.gauge('socket-io.clients', io.sockets.clients().length)
|
||||
|
||||
const info = {
|
||||
session,
|
||||
publicId: client.publicId,
|
||||
clientId: client.id,
|
||||
isDebugging,
|
||||
}
|
||||
if (isDebugging) {
|
||||
logger.info(info, 'client connected')
|
||||
} else {
|
||||
logger.debug(info, 'client connected')
|
||||
}
|
||||
|
||||
let user
|
||||
if (session && session.passport && session.passport.user) {
|
||||
;({ user } = session.passport)
|
||||
|
@ -238,6 +226,20 @@ module.exports = Router = {
|
|||
user = { _id: 'anonymous-user', anonymousAccessToken }
|
||||
}
|
||||
|
||||
const info = {
|
||||
userId: user._id,
|
||||
projectId,
|
||||
transport: client.transport,
|
||||
publicId: client.publicId,
|
||||
clientId: client.id,
|
||||
isDebugging,
|
||||
}
|
||||
if (isDebugging) {
|
||||
logger.info(info, 'client connected')
|
||||
} else {
|
||||
logger.debug(info, 'client connected')
|
||||
}
|
||||
|
||||
const connectionDetails = {
|
||||
userId: user._id,
|
||||
projectId,
|
||||
|
|
Loading…
Add table
Reference in a new issue