Skip to content

Commit e56c740

Browse files
committed
Update log output
1 parent 1d9baa9 commit e56c740

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

source/logging-and-monitoring/logging.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,13 @@ The following example configures the log level to ``INFO``. Select the :guilabel
202202
:copyable: false
203203

204204
...
205-
1317 [cluster-ClusterId{value='<your cluster id>', description='null'}-<your connection uri>] INFO org.mongodb.driver.cluster - Discovered replica set primary <your connection uri>
206-
1568 [main] INFO org.mongodb.driver.connection - Opened connection [connectionId{localValue:7, serverValue:<server value>}] to <your connection uri>
205+
13:21:29.164 [main] INFO org.mongodb.driver.client - MongoClient with metadata {"driver": {"name": "mongo-java-driver|sync|kotlin", "version": "5.6.0-alpha0-20-g222541cd92-dirty"}, "os": {"type": "Darwin", "name": "Mac OS X", "architecture": "aarch64", "version": "15.5"}, "platform": "Java/JetBrains s.r.o./17.0.9+8-b1166.2|kotlin/1.8.10"} created with settings MongoClientSettings{readPreference=primary, writeConcern=WriteConcern{w=null, wTimeout=null ms, journal=null}, retryWrites=true, retryReads=true, readConcern=ReadConcern{level=null}, credential=null, transportSettings=null, commandListeners=[], codecRegistry=ProvidersCodecRegistry{codecProviders=[ValueCodecProvider{}, BsonValueCodecProvider{}, DBRefCodecProvider{}, DBObjectCodecProvider{}, DocumentCodecProvider{}, CollectionCodecProvider{}, IterableCodecProvider{}, MapCodecProvider{}, GeoJsonCodecProvider{}, GridFSFileCodecProvider{}, Jsr310CodecProvider{}, JsonObjectCodecProvider{}, BsonCodecProvider{}, EnumCodecProvider{}, com.mongodb.client.model.mql.ExpressionCodecProvider@63a12c68, com.mongodb.Jep395RecordCodecProvider@28f3b248, com.mongodb.KotlinCodecProvider@1b1426f4]}, loggerSettings=LoggerSettings{maxDocumentLength=1000}, clusterSettings={hosts=[localhost:27017], srvServiceName=mongodb, mode=SINGLE, requiredClusterType=UNKNOWN, requiredReplicaSetName='null', serverSelector='null', clusterListeners='[]', serverSelectionTimeout='30000 ms', localThreshold='15 ms'}, socketSettings=SocketSettings{connectTimeoutMS=10000, readTimeoutMS=0, receiveBufferSize=0, proxySettings=ProxySettings{host=null, port=null, username=null, password=null}}, heartbeatSocketSettings=SocketSettings{connectTimeoutMS=10000, readTimeoutMS=10000, receiveBufferSize=0, proxySettings=ProxySettings{host=null, port=null, username=null, password=null}}, connectionPoolSettings=ConnectionPoolSettings{maxSize=100, minSize=0, maxWaitTimeMS=120000, maxConnectionLifeTimeMS=0, maxConnectionIdleTimeMS=0, maintenanceInitialDelayMS=0, maintenanceFrequencyMS=60000, connectionPoolListeners=[], maxConnecting=2}, serverSettings=ServerSettings{heartbeatFrequencyMS=10000, minHeartbeatFrequencyMS=500, serverMonitoringMode=AUTO, serverListeners='[]', serverMonitorListeners='[]'}, sslSettings=SslSettings{enabled=false, invalidHostNameAllowed=false, context=null}, applicationName='null', compressorList=[], uuidRepresentation=UNSPECIFIED, serverApi=null, autoEncryptionSettings=null, dnsClient=null, inetAddressResolver=null, contextProvider=null, timeoutMS=null}
206+
13:21:29.213 [main] DEBUG org.mongodb.driver.connection - Connection created: address=localhost:27017, driver-generated ID=3
207+
13:21:29.218 [main] DEBUG org.mongodb.driver.connection - Connection ready: address=localhost:27017, driver-generated ID=3, established in=5 ms
208+
13:21:29.219 [main] DEBUG org.mongodb.driver.connection - Connection checked out: address=localhost:27017, driver-generated ID=3, duration=10 ms
209+
13:21:29.237 [main] DEBUG org.mongodb.driver.protocol.command - Command "find" started on database "test" using a connection with driver-generated ID 3 and server-generated ID 516757 to localhost:27017. The request ID is 5 and the operation ID is 5. Command: {"find": "test", "filter": {}, "limit": 1, "singleBatch": true, "$db": "test", "lsid": {"id": {"$binary": {"base64": "Bw3a3QK7QAGob8VghbJguw==", "subType": "04"}}}}
210+
13:21:29.244 [main] DEBUG org.mongodb.driver.protocol.command - Command "find" succeeded on database "test" in 8.823416 ms using a connection with driver-generated ID 3 and server-generated ID 516757 to localhost:27017. The request ID is 5 and the operation ID is 5. Command reply: {"cursor": {"firstBatch": [{"_id": {"$oid": "6876d15f70164c1e5a47be02"}, "advance": "$clusterTime"}], "id": 0, "ns": "test.test"}, "ok": 1.0, "$clusterTime": {"clusterTime": {"$timestamp": {"t": 1753129287, "i": 1}}, "signature": {"hash": {"$binary": {"base64": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=", "subType": "00"}}, "keyId": 0}}, "operationTime": {"$timestamp": {"t": 1753129283, "i": 1}}}
211+
13:21:29.249 [main] DEBUG org.mongodb.driver.operation - Received batch of 1 documents with cursorId 0 from server localhost:27017
207212

208213
.. tabs::
209214

@@ -253,8 +258,7 @@ The following example configures the log level to ``INFO``. Select the :guilabel
253258
:copyable: false
254259

255260
...
256-
10:14:57.633 [cluster-ClusterId{value=<your cluster id>, description='null'}-<your connection uri>] INFO org.mongodb.driver.cluster - Discovered replica set primary <your connection uri>
257-
10:14:57.790 [main] INFO org.mongodb.driver.connection - Opened connection [connectionId{localValue:7, serverValue:<your server value>}] to <your connection uri>
261+
258262

259263
Logger Names
260264
------------

0 commit comments

Comments
 (0)