Turn off warning when using command method

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.0
    • Component/s: Cluster Management
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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)
      db.cleanCursors(false)

      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
      WARNING: Server seen up: SD2DVD07VL.SAKSDIRECT.COM:27017
      Aug 2, 2012 11:50:09 AM com.mongodb.ReplicaSetStatus findNode
      WARNING: couldn't resolve host [SD2DVD03VL:27017]
      Aug 2, 2012 11:50:09 AM com.mongodb.ReplicaSetStatus _addIfNotHere
      WARNING: couldn't resolve host [SD2DVD03VL:27017]
      Aug 2, 2012 11:50:09 AM com.mongodb.ReplicaSetStatus$Node update
      WARNING: Server seen up: SD2DVD08VL.SAKSDIRECT.COM:27017
      Aug 2, 2012 11:50:09 AM com.mongodb.ReplicaSetStatus findNode
      WARNING: couldn't resolve host [SD2DVD03VL:27017]
      Aug 2, 2012 11:50:09 AM com.mongodb.ReplicaSetStatus _addIfNotHere
      WARNING: couldn't resolve host [SD2DVD03VL:27017]
      Aug 2, 2012 11:50:09 AM com.mongodb.ReplicaSetStatus$Node update
      WARNING: Server seen up: SD2DVD03VL.SAKSDIRECT.COM:27017
      Aug 2, 2012 11:50:09 AM com.mongodb.ReplicaSetStatus findNode
      WARNING: couldn't resolve host [SD2DVD03VL:27017]
      Aug 2, 2012 11:50:09 AM com.mongodb.ReplicaSetStatus _addIfNotHere
      WARNING: couldn't resolve host [SD2DVD03VL:27017]
      Aug 2, 2012 11:50:09 AM com.mongodb.ReplicaSetStatus findNode
      WARNING: couldn't resolve host [SD2DVD03VL:27017]
      Aug 2, 2012 11:50:09 AM com.mongodb.ReplicaSetStatus _addIfNotHere
      WARNING: couldn't resolve host [SD2DVD03VL:27017]
      Aug 2, 2012 11:50:09 AM com.mongodb.ReplicaSetStatus findNode
      WARNING: couldn't resolve host [SD2DVD03VL:27017]
      Aug 2, 2012 11:50:09 AM com.mongodb.ReplicaSetStatus _addIfNotHere
      WARNING: couldn't resolve host [SD2DVD03VL:27017]
      Aug 2, 2012 11:50:09 AM com.mongodb.ReplicaSetStatus findNode
      WARNING: couldn't resolve host [SD2DVD03VL:27017]
      Aug 2, 2012 11:50:09 AM com.mongodb.ReplicaSetStatus _addIfNotHere
      WARNING: couldn't resolve host [SD2DVD03VL:27017]

      Any of the options below are fine with me:
      1) Is there a better way to get the hosts used in a replica set?
      2) Can I turn off temporarily the logs exposed by the driver for that particular operation?
      3) How to change log level?

      Thanks

            Assignee:
            Unassigned
            Reporter:
            Sam Irmes
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: