[JAVA-615] Turn off warning when using command method Created: 02/Aug/12 Updated: 11/Sep/19 Resolved: 03/Aug/12 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Cluster Management |
| Affects Version/s: | 2.0 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor - P4 |
| Reporter: | Sam Irmes | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
When I run the java driver method command like in the scala code below: private var db: DB = null ...[more set up code here].. db = mongoConnection.getDB(saksApiDBName) and run the command db.command("isMaster"); I get the expected result, what is { "setName" : "DEVrs" , "ismaster" : true , "secondary" : false , "hosts" : [ "SD2DVD07VL.SAKSDIRECT.COM:27017" , "SD2DVD08VL.SAKSDIRECT.COM:27017" , "SD2DVD03VL:27017"] , "primary" : "SD2DVD07VL.SAKSDIRECT.COM:27017" , "me" : "SD2DVD07VL.SAKSDIRECT.COM:27017" , "maxBsonObjectSize" : 16777216 , "ok" : 1.0}but also get warnings in the console: Aug 2, 2012 11:50:09 AM com.mongodb.ReplicaSetStatus$Node update Any of the options below are fine with me: Thanks |
| Comments |
| Comment by Jeffrey Yemin [ 03/Aug/12 ] |
|
Glad to be of help. |
| Comment by Sam Irmes [ 03/Aug/12 ] |
|
Got it! I am going to upgrade to 2.8.0 and change my log level (should be that). |
| Comment by Jeffrey Yemin [ 03/Aug/12 ] |
|
You set affect version 2.0, so I thought that's what you were using. The current version of the driver is 2.8.0, which has many new features, bug fixes, and some performance improvements. Regarding the log level, it depends on what logging framework you're using. Usually this is controlled via an external configuration file, but it can also be done programmatically. If you're using Log4J, check out http://logging.apache.org/log4j/1.2/manual.html. |
| Comment by Sam Irmes [ 03/Aug/12 ] |
|
Thanks, I will try the option 3 like you said. Can you tell me how to do that in my java class? Also, we are using java driver 2.6.3. Did you see anything we could improve? |
| Comment by Jeffrey Yemin [ 03/Aug/12 ] |
Just curious also why you're using such an old driver version? There have been a lot of improvements since 2.0. |