From ef9797e58fcc55cf46a7dfb2716b01166525a9ef Mon Sep 17 00:00:00 2001 From: zeus Date: Wed, 18 Nov 2020 00:22:41 +0200 Subject: [PATCH] add --- swarmlab-app/src/run/app.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/swarmlab-app/src/run/app.js b/swarmlab-app/src/run/app.js index 7867701..8058256 100755 --- a/swarmlab-app/src/run/app.js +++ b/swarmlab-app/src/run/app.js @@ -135,8 +135,10 @@ cors(corsOptions), (req, res, next) => { console.log("PATH "+JSON.stringify(req.body[0].tailed_path)); for (var i = 0; i < req.body.length; i++){ var obj = req.body[i]; + var reslog = new Object(); - reslog.message = obj + reslog.log = obj + var now = new Date(); var n = {} n.year = now.getFullYear(); @@ -147,7 +149,7 @@ cors(corsOptions), (req, res, next) => { n.seconds = now.getSeconds(); n.milliseconds = now.getMilliseconds(); reslog.date = n - console.log(n); + console.log(reslog); io.emit("logdata", reslog); /*