summary refs log tree commit diff
path: root/src/gateway
diff options
context:
space:
mode:
Diffstat (limited to 'src/gateway')
-rw-r--r--src/gateway/events/Connection.ts17
-rw-r--r--src/gateway/opcodes/Identify.ts5
2 files changed, 9 insertions, 13 deletions
diff --git a/src/gateway/events/Connection.ts b/src/gateway/events/Connection.ts

index 3e7e2f3a..ca4770b2 100644 --- a/src/gateway/events/Connection.ts +++ b/src/gateway/events/Connection.ts
@@ -79,18 +79,11 @@ export async function Connection(this: WS.Server, socket: WebSocket, request: In console.log(`[Gateway] New connection from ${ipAddress}, total ${this.clients.size}`); if (EnvConfig.get().logging.gatewayLogging.logHttp) - [ - "close", - "error", - "upgrade", - "open", - "ping", - "pong", - "unexpected-response", - ...(EnvConfig.get().logging.gatewayLogging.logHttpMessages ? ["message"] : []), - ].forEach((x) => { - socket.on(x, (y) => console.log(x, y)); - }); + ["close", "error", "upgrade", "open", "ping", "pong", "unexpected-response", ...(EnvConfig.get().logging.gatewayLogging.logHttpMessages ? ["message"] : [])].forEach( + (x) => { + socket.on(x, (y) => console.log(x, y)); + }, + ); const { searchParams } = new URL(`http://localhost${request.url}`); // @ts-ignore diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts
index 86a41124..2e77c622 100644 --- a/src/gateway/opcodes/Identify.ts +++ b/src/gateway/opcodes/Identify.ts
@@ -728,5 +728,8 @@ export async function onIdentify(this: WebSocket, data: Payload) { const setupListenerTime = Date.now(); - console.log(`[Gateway] IDENTIFY ${this.user_id} in ${totalSw.elapsed().totalMilliseconds}ms`, EnvConfig.get().logging.gatewayLogging.logTraces ? JSON.stringify(d._trace, null, 2) : ""); + console.log( + `[Gateway] IDENTIFY ${this.user_id} in ${totalSw.elapsed().totalMilliseconds}ms`, + EnvConfig.get().logging.gatewayLogging.logTraces ? JSON.stringify(d._trace, null, 2) : "", + ); }