diff --git a/routes/temp.js b/routes/temp.js index c809b2c..77b7a24 100644 --- a/routes/temp.js +++ b/routes/temp.js @@ -139,17 +139,17 @@ busEmitter.on('saveTempData', doInsertEvent); // Socket Stuff logger.info('Configuring WebSocket Listener...'); -logger.info('Creating server...'); +logger.trace('Creating server...'); var server = http.createServer(function (request, response) { logger.info((new Date()) + ' Received request for ' + request.url); response.writeHead(404); response.end(); }); -logger.info('Creating listener...'); +logger.trace('Creating listener...'); server.listen(8031, function () { logger.info((new Date()) + ' Server is listening on port 8031'); }); -logger.info('Creating wsServer...'); +logger.trace('Creating wsServer...'); var wsServer = new WebSocketServer({ httpServer: server, // You should not use autoAcceptConnections for production @@ -166,11 +166,11 @@ function originIsAllowed(origin) { } wsServer.on('request', function (request) { - + logger.trace('CREATING CONNECTION'); if (!originIsAllowed(request.origin)) { // Make sure we only accept requests from an allowed origin request.reject(); - logger.debug((new Date()) + ' Connection from origin ' + request.origin + ' rejected.'); + logger.error((new Date()) + ' Connection from origin ' + request.origin + ' rejected.'); return; }