-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
The toString of a MongoClient does a really good job of documenting the Options that it was created with like
Mongo{authority=MongoAuthority{type=Set, serverAddresses=[bobk-mbp.local/10.78.4.164:27017, bobk-mbp.local/10.78.4.164:27018], credentials={credentials={}}}, options=MongoOptions{description='null', connectionsPerHost=10, threadsAllowedToBlockForConnectionMultiplier=5, maxWaitTime=2000, connectTimeout=2000, socketTimeout=2000, socketKeepAlive=false, autoConnectRetry=false, maxAutoConnectRetryTime=0, slaveOk=false, readPreference=primary, dbDecoderFactory=DefaultDBDecoder.DefaultFactory, dbEncoderFactory=DefaultDBEncoder.DefaultFactory, safe=false, w=0, wtimeout=0, fsync=false, j=false, socketFactory=javax.net.DefaultSocketFactory@446d0fff, cursorFinalizerEnabled=true, writeConcern=WriteConcern
{ "getlasterror" : 1}/ (Continue Inserting on Errors? false), alwaysUseMBeans=false}}
The MongoClientOptions object fails to do the same job making my logging unable to pro-actively log the options I am about to open a Mongo connection with:
com.mongodb.MongoClientOptions@af9cc855
I would really like to see the toString of MongoClientOptions produce a toString identical to what the MongoClient's toString produces as options=MongoOptions.