Skip to content

Commit ca134eb

Browse files
Merge pull request simstudioai#532 from simstudioai/fix/realtime
fix(socket logs): remove debug sockets logs
2 parents fc6be73 + 842d032 commit ca134eb

1 file changed

Lines changed: 1 addition & 42 deletions

File tree

apps/sim/socket-server/index.ts

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -294,12 +294,6 @@ async function authenticateSocket(socket: AuthenticatedSocket, next: any) {
294294
socket.userEmail = session.user.email
295295
socket.activeOrganizationId = session.session.activeOrganizationId || undefined
296296

297-
logger.info(`✅ Socket.IO user authenticated via token: ${socket.id}`, {
298-
userId: session.user.id,
299-
userName: socket.userName,
300-
organizationId: socket.activeOrganizationId,
301-
origin,
302-
})
303297
next()
304298
} catch (tokenError) {
305299
const errorMessage = tokenError instanceof Error ? tokenError.message : String(tokenError)
@@ -581,8 +575,6 @@ async function persistWorkflowOperation(workflowId: string, operation: any) {
581575
throw new Error(`Unknown operation target: ${target}`)
582576
}
583577
})
584-
585-
logger.debug(`✅ Persisted ${op} operation on ${target} for workflow ${workflowId}`)
586578
} catch (error) {
587579
logger.error(
588580
`❌ Error persisting workflow operation (${operation.operation} on ${operation.target}):`,
@@ -758,10 +750,6 @@ async function handleSubflowOperationImpl(
758750
.where(
759751
and(eq(workflowBlocks.id, payload.id), eq(workflowBlocks.workflowId, workflowId))
760752
)
761-
762-
logger.debug(
763-
`[SERVER] ✅ Also updated loop block ${payload.id} data.count = ${payload.config.iterations}`
764-
)
765753
} else if (payload.type === 'parallel') {
766754
// Update the parallel block's data properties
767755
const blockData = {
@@ -795,17 +783,8 @@ async function handleSubflowOperationImpl(
795783
.where(
796784
and(eq(workflowBlocks.id, payload.id), eq(workflowBlocks.workflowId, workflowId))
797785
)
798-
799-
logger.debug(`[SERVER] ✅ Also updated parallel block ${payload.id} data:`, {
800-
count: payload.config.count,
801-
collection: payload.config.distribution,
802-
parallelType: payload.config.parallelType,
803-
})
804786
}
805787

806-
logger.debug(
807-
`[SERVER] ✅ Successfully updated subflow ${payload.id} in workflow ${workflowId}`
808-
)
809788
break
810789
}
811790

@@ -924,8 +903,6 @@ async function handleBlockOperationImpl(
924903
type: payload.type,
925904
config: subflowConfig,
926905
})
927-
928-
logger.debug(`[SERVER] ✅ Successfully created ${payload.type} subflow ${payload.id}`)
929906
} catch (subflowError) {
930907
logger.error(
931908
`[SERVER] ❌ Failed to create ${payload.type} subflow ${payload.id}:`,
@@ -1074,10 +1051,6 @@ async function handleBlockOperationImpl(
10741051
.where(
10751052
and(eq(workflowSubflows.id, payload.id), eq(workflowSubflows.workflowId, workflowId))
10761053
)
1077-
1078-
logger.debug(
1079-
`[SERVER] ✅ Cascade deleted ${childBlocks.length} child blocks and subflow ${payload.id}`
1080-
)
10811054
}
10821055

10831056
// Remove any edges connected to this block
@@ -1291,13 +1264,6 @@ io.engine.on('connection_error', (err) => {
12911264
})
12921265

12931266
io.on('connection', (socket: AuthenticatedSocket) => {
1294-
logger.info(`✅ Socket.IO user connected: ${socket.id}`, {
1295-
transport: socket.conn.transport.name,
1296-
remoteAddress: socket.conn.remoteAddress,
1297-
userId: socket.userId,
1298-
userName: socket.userName,
1299-
})
1300-
13011267
// Set up error handling for this socket
13021268
socket.on('error', (error) => {
13031269
logger.error(`Socket ${socket.id} error:`, error)
@@ -1504,10 +1470,6 @@ io.on('connection', (socket: AuthenticatedSocket) => {
15041470
operationId: broadcastData.metadata.operationId,
15051471
serverTimestamp,
15061472
})
1507-
1508-
logger.info(
1509-
`✅ Operation ${operation} on ${target} in workflow ${workflowId} by user ${session.userId} (${session.userName})`
1510-
)
15111473
} catch (error) {
15121474
if (error instanceof z.ZodError) {
15131475
socket.emit('operation-error', {
@@ -1647,9 +1609,6 @@ io.on('connection', (socket: AuthenticatedSocket) => {
16471609
})
16481610
.where(and(eq(workflowBlocks.id, blockId), eq(workflowBlocks.workflowId, workflowId)))
16491611

1650-
logger.debug(
1651-
`✅ Persisted subblock update: ${workflowId}/${blockId}.${subblockId} = ${JSON.stringify(value)}`
1652-
)
16531612
updateSuccessful = true
16541613
})
16551614

@@ -1854,7 +1813,7 @@ logger.info('Starting Socket.IO server...', {
18541813
})
18551814

18561815
httpServer.listen(PORT, '0.0.0.0', () => {
1857-
logger.info(`Socket.IO server running on port ${PORT}`)
1816+
logger.info(`Socket.IO server running on port ${PORT}`)
18581817
logger.info(`🏥 Health check available at: http://localhost:${PORT}/health`)
18591818
})
18601819

0 commit comments

Comments
 (0)