chore: Reduce WebSocket logging from info to debug
Connect/disconnect messages were flooding production logs. Changed to log.debug level for cleaner output.
This commit is contained in:
parent
e7d23f4c7f
commit
58d38aef8a
1 changed files with 2 additions and 2 deletions
|
|
@ -29,7 +29,7 @@ export async function websocketPlugin(fastify: FastifyInstance) {
|
||||||
const socket = connection.socket;
|
const socket = connection.socket;
|
||||||
|
|
||||||
clients.set(clientId, socket);
|
clients.set(clientId, socket);
|
||||||
fastify.log.info(`WebSocket client connected: ${clientId}`);
|
fastify.log.debug(`WebSocket client connected: ${clientId}`);
|
||||||
|
|
||||||
// Send welcome message
|
// Send welcome message
|
||||||
socket.send(JSON.stringify({
|
socket.send(JSON.stringify({
|
||||||
|
|
@ -53,7 +53,7 @@ export async function websocketPlugin(fastify: FastifyInstance) {
|
||||||
|
|
||||||
socket.on('close', () => {
|
socket.on('close', () => {
|
||||||
clients.delete(clientId);
|
clients.delete(clientId);
|
||||||
fastify.log.info(`WebSocket client disconnected: ${clientId}`);
|
fastify.log.debug(`WebSocket client disconnected: ${clientId}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.on('error', (error: Error) => {
|
socket.on('error', (error: Error) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue