I followed this mongodb documentation. Here is my code
public class JMongoDBCDemo { MongoClient mongoClient; DB db; DBCollection coll; public
Thanks to @jyemin By using MongoDB official documentation link
Logger mongoLogger = Logger.getLogger( "org.mongodb.driver" ); mongoLogger.setLevel(Level.SEVERE);
Now no logs are there in the console.