I am using Fongo, Fongo is an in-memory java implementation of MongoDB.
How to prevent these logs It creating a lengthy log which occupies a lot of space. I am using following dependencies
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver</artifactId>
<version>3.4.2</version>
</dependency>
<dependency>
<groupId>com.github.fakemongo</groupId>
<artifactId>fongo</artifactId>
<version>2.1.1</version>
</dependency>
I am getting this kind of logs
12:13:34.406 [TestNG-test=Package with subpackages-1] DEBUG com.mongodb.FongoDBCollection
12:13:34.406 [TestNG-test=Package with subpackages-1] DEBUG com.mongodb.FongoDBCollection
12:13:34.407 [TestNG-test=Package with subpackages-1] DEBUG com.mongodb.FongoDBCollection
12:13:34.407 [TestNG-test=Package with subpackages-1] DEBUG com.mongodb.FongoDBCollection
12:13:34.407 [TestNG-test=Package with subpackages-1] DEBUG com.github.fakemongo.impl.ExpressionParser
12:13:34.407 [TestNG-test=Package with subpackages-1] DEBUG com.mongodb.FongoDBCollection
Getting huge logs for the following code (at line 3).
MongoCollection<Document> colls = db.getCollection("test_data");
Document criteriaDoc = (new Search(criteriaString)).getCriteria();
Document doc = colls.aggregate(Arrays.asList(Aggregates.match(criteriaDoc), Aggregates.sample(1))).first();