|
Linking to JAVA-2698, which I expect will address your concerns. A fix for this issue will be included in the 3.7 release of the driver in the next few months.
The command logging is included at DEBUG in the org.mongodb.driver.protocol.command logger, and looks like this (the example is for the find command):
10:18:18.819 [main] DEBUG org.mongodb.driver.protocol.command - Sending command '{ "find" : "test", "filter" : { "x" : 1 }, "sort" : { "y" : 1 }, "projection" : { "y" : 1 }, "$db" : "test", "lsid" : { "id" : { "$binary" : { "base64" : "ShsRPF35T0ijm0Lpnj9CIA==", "subType" : "04" } } }, "$readPreference" : { "mode" : "primaryPreferred" } }' with request id 8 to database test on connection [connectionId{localValue:2, serverValue:433}] to server 127.0.0.1:27017
|
Let us know if this meets your needs, and if so I'll resolve this as a duplicate.
|