diff --git a/swarmlab-app/src/run/app.js b/swarmlab-app/src/run/app.js index ca839a6..b8851ee 100755 --- a/swarmlab-app/src/run/app.js +++ b/swarmlab-app/src/run/app.js @@ -404,11 +404,16 @@ function onCollection(err, collection) { // cursorStream = cursor.stream(), var itemsProcessed = 0; + var reslog = new Object(); + var now = new Date(); //cursorStream.on('data', function (data) { cursor.on('data', function (data) { + reslog.log = data + reslog.date = convertDateToUTC(now) console.log('data ' + data.value); var user = "anagnostopoulos@uniwa.gr" - io.in(user).emit("logdata", data.value); + //io.in(user).emit("logdata", data.value); + io.in(user).emit("logdata", reslog); itemsProcessed++; });