Log
This commit is contained in:
parent
8fe0dec4d6
commit
95733b2fc7
|
@ -35,9 +35,13 @@ app.use(bodyParser.urlencoded({ extended: false }));
|
|||
app.use(bodyParser.json());
|
||||
|
||||
app.use(function(req, res, next) {
|
||||
|
||||
// Log connection
|
||||
console.dir(req.headers)
|
||||
console.log('[REQ] ' + new Date() + ' ' + req.headers['X-Forwarded-For'] + ' : ' + req.url);
|
||||
console.log(
|
||||
'[REQ] ' + new Date() + ' ' +
|
||||
(req.headers['x-forwarded-for'] || req.connection.remoteAddress) +
|
||||
' : ' + req.url
|
||||
);
|
||||
|
||||
res.locals.title = "3DUI";
|
||||
res.locals.urls = urls;
|
||||
|
|
|
@ -4,10 +4,10 @@ var geo = require('./lib/geo.min.js');
|
|||
module.exports = function(io) {
|
||||
io.on('connection', function(socket) {
|
||||
|
||||
console.log('[SOK] ' + new Date() + ' ' + socket.conn.remoteAddress + ' connection');
|
||||
console.log('[SOK] ' + new Date() + ' ' + socket.handshake.address + ' connection');
|
||||
|
||||
socket.on('disconnect', function() {
|
||||
console.log('[SOK] ' + new Date() + ' ' + socket.conn.remoteAddress + ' disconnect');
|
||||
console.log('[SOK] ' + new Date() + ' ' + socket.handshake.address + ' disconnect');
|
||||
});
|
||||
|
||||
var streamer = new geo.MeshStreamer();
|
||||
|
|
Loading…
Reference in New Issue