mirror of
https://github.com/Cameri/nostream.git
synced 2025-07-23 20:15:14 +02:00
chore: improve logging
This commit is contained in:
@@ -68,7 +68,7 @@ export class WebSocketAdapter extends EventEmitter implements IWebSocketAdapter
|
||||
family: address.indexOf(':') >= 0 ? 'ipv6' : 'ipv4',
|
||||
})
|
||||
|
||||
console.log(`web-socket-adapter: new client ${this.clientId} (${this.getClientAddress()})`)
|
||||
console.log(`web-socket-adapter: new client ${this.clientId} (${this.getClientAddress()}) - ${(this.webSocketServer as any).webSocketServer.clients.size} total on worker ${process.pid}`)
|
||||
|
||||
this.client
|
||||
.on('error', (error) => {
|
||||
@@ -276,6 +276,6 @@ export class WebSocketAdapter extends EventEmitter implements IWebSocketAdapter
|
||||
this.removeAllListeners()
|
||||
this.client.removeAllListeners()
|
||||
|
||||
console.error(`web-socket-adapter: disconnected client ${this.clientId} (${this.getClientAddress()})`)
|
||||
console.error(`web-socket-adapter: disconnected client ${this.clientId} (${this.getClientAddress()}) - ${(this.webSocketServer as any).webSocketServer.clients.size} total on worker ${process.pid}`)
|
||||
}
|
||||
}
|
||||
|
@@ -95,8 +95,6 @@ export class WebSocketServerAdapter extends WebServerAdapter implements IWebSock
|
||||
return
|
||||
}
|
||||
|
||||
console.log('web-socket-server-adapter: connected clients:', this.webSocketServer.clients.size)
|
||||
|
||||
this.webSocketsAdapters.set(client, this.createWebSocketAdapter([client, req, this]))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user