From b69b58041a665cf8fafd59227ff491ffdc80ae7a Mon Sep 17 00:00:00 2001 From: zeus Date: Tue, 24 Nov 2020 20:52:12 +0200 Subject: [PATCH] mongo tail --- swarmlab-app/src/run/app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/swarmlab-app/src/run/app.js b/swarmlab-app/src/run/app.js index 365b71c..1733800 100755 --- a/swarmlab-app/src/run/app.js +++ b/swarmlab-app/src/run/app.js @@ -266,7 +266,7 @@ MongoClient.connect(mongourl, OPTS, function(err, client){ const db = client.db('fluent'); //db.collection('log', onCollection); console.log(JSON.stringify('mongo connected')) - var stream = db.collection('log').find({}, { + var stream = db.collection('logs').find({}, { tailable: true, awaitdata: true /* other options */ @@ -434,8 +434,8 @@ MongoClient.connect(mongourl, OPTS, function(err, client){ console.log(err); } else { const db = client.db('fluent'); -db.collection('log', onCollection); -var stream = db.collection('log').find({}, { +db.collection('logs', onCollection); +var stream = db.collection('logs').find({}, { tailable: true, awaitdata: true /* other options */