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(bodyParser.json());
|
||||||
|
|
||||||
app.use(function(req, res, next) {
|
app.use(function(req, res, next) {
|
||||||
|
|
||||||
// Log connection
|
// Log connection
|
||||||
console.dir(req.headers)
|
console.log(
|
||||||
console.log('[REQ] ' + new Date() + ' ' + req.headers['X-Forwarded-For'] + ' : ' + req.url);
|
'[REQ] ' + new Date() + ' ' +
|
||||||
|
(req.headers['x-forwarded-for'] || req.connection.remoteAddress) +
|
||||||
|
' : ' + req.url
|
||||||
|
);
|
||||||
|
|
||||||
res.locals.title = "3DUI";
|
res.locals.title = "3DUI";
|
||||||
res.locals.urls = urls;
|
res.locals.urls = urls;
|
||||||
|
|
|
@ -4,10 +4,10 @@ var geo = require('./lib/geo.min.js');
|
||||||
module.exports = function(io) {
|
module.exports = function(io) {
|
||||||
io.on('connection', function(socket) {
|
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() {
|
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();
|
var streamer = new geo.MeshStreamer();
|
||||||
|
|
Loading…
Reference in New Issue