|
|
@ -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 */ |
|
|
|