I have MongoDB 3.2.9
and I am developing an Java application with Jongo 1.3.0
but the NetBeans
console is showing the next red message:
nov 24, 2016 2:30:17 AM com.mongodb.diagnostics.logging.JULLogger log
INFORMACIÓN: Cluster created with settings {hosts=[localhost:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}
nov 24, 2016 2:30:18 AM com.mongodb.diagnostics.logging.JULLogger log
INFORMACIÓN: Opened connection [connectionId{localValue:1, serverValue:86}] to localhost:27017
nov 24, 2016 2:30:18 AM com.mongodb.diagnostics.logging.JULLogger log
INFORMACIÓN: Monitor thread successfully connected to server with description ServerDescription{address=localhost:27017, type=STANDALONE, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 2, 9]}, minWireVersion=0, maxWireVersion=4, maxDocumentSize=16777216, roundTripTimeNanos=4886848}
nov 24, 2016 2:30:19 AM com.mongodb.diagnostics.logging.JULLogger log
INFORMACIÓN: Opened connection [connectionId{localValue:2, serverValue:87}] to localhost:27017
As this project is a University homework, my teacher will say me this is a problem; for this reason I would like remove theses messages or change its color.
As additional information I am using:
... and when I change mongo-java-driver
version, my application not working.
This is my java code:
collection = (new Jongo(new MongoClient( "localhost" , 27017 ).getDB("mydb"))).getCollection("mycollection");
Thank you for all. This was my solution:
Logger mongoLogger = Logger.getLogger( "org.mongodb.driver" );
mongoLogger.setLevel(Level.SEVERE);