feat(logging): add logger
This commit is contained in:
parent
7c84025f3c
commit
aae85cd767
15 changed files with 240 additions and 17 deletions
|
@ -2,6 +2,7 @@ import { WebSocketServer } from 'ws';
|
|||
import { handleConnection } from './connectionManager';
|
||||
import http from 'http';
|
||||
import { getPort } from '../config';
|
||||
import logger from '../utils/logger';
|
||||
|
||||
export const initServer = (
|
||||
server: http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>,
|
||||
|
@ -13,5 +14,5 @@ export const initServer = (
|
|||
handleConnection(ws);
|
||||
});
|
||||
|
||||
console.log(`WebSocket server started on port ${port}`);
|
||||
logger.info(`WebSocket server started on port ${port}`);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue