From 207a212274ef62ab632d05bf3b5572f2f8b605be Mon Sep 17 00:00:00 2001 From: Michael Morisi Date: Wed, 12 Mar 2025 12:53:25 -0400 Subject: [PATCH 1/4] DOCSP-48327: Address technical feedback on Logging page --- source/logging.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/logging.txt b/source/logging.txt index 84ba3470..b6e463dd 100644 --- a/source/logging.txt +++ b/source/logging.txt @@ -37,7 +37,7 @@ logging library, see the `Python logging library documentation Date: Wed, 12 Mar 2025 14:04:30 -0400 Subject: [PATCH 2/4] Noah feedback --- source/logging.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/logging.txt b/source/logging.txt index b6e463dd..49a7f5fe 100644 --- a/source/logging.txt +++ b/source/logging.txt @@ -57,7 +57,7 @@ message, as shown by this example ``INFO`` message: .. code-block:: none - INFO:pymongo.mongo_client:MongoClient opened default port on mongodb://localhost:27017/ + INFO:pymongo.command:Command insert on namespace test.test_collection Configuring Truncation ---------------------- From 36f91076a05a8618a27575e37da92245f87a7491 Mon Sep 17 00:00:00 2001 From: Michael Morisi Date: Thu, 13 Mar 2025 10:37:44 -0400 Subject: [PATCH 3/4] Fix log message --- source/logging.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/logging.txt b/source/logging.txt index 49a7f5fe..77d86d57 100644 --- a/source/logging.txt +++ b/source/logging.txt @@ -53,11 +53,11 @@ The following example sets the log level on the ``pymongo.command`` component to logging.getLogger("pymongo.command").setLevel(logging.DEBUG) Messages that the driver outputs will have the log level specified at the beginning of the -message, as shown by this example ``INFO`` message: +message, as shown by this example ``DEBUG`` message: .. code-block:: none - INFO:pymongo.command:Command insert on namespace test.test_collection + DEBUG:pymongo.command:{"clientId": {"$oid": "..."}, "message": "Command started", "command": "{\"insert\": \"test\", \"ordered\": true, \"lsid\": {\"id\": {\"$binary\": {\"base64\": \"GI7ubVhPSsWd7+OwHEFx6Q==\", \"subType\": \"04\"}}}, \"$db\": \"db\", \"documents\": [{\"x\": 1, \"_id\": {\"$oid\": \"...\"}}]}", "commandName": "insert", "databaseName": "db", "requestId": ..., "operationId": ..., "driverConnectionId": 1, "serverConnectionId": 3554, "serverHost": "localhost", "serverPort": 27017} Configuring Truncation ---------------------- From dd54d05a2204b87fdf4a8fdf035348b2abfe9b6e Mon Sep 17 00:00:00 2001 From: Michael Morisi Date: Thu, 13 Mar 2025 10:38:39 -0400 Subject: [PATCH 4/4] Fix --- source/logging.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/logging.txt b/source/logging.txt index 77d86d57..8f7246da 100644 --- a/source/logging.txt +++ b/source/logging.txt @@ -57,7 +57,7 @@ message, as shown by this example ``DEBUG`` message: .. code-block:: none - DEBUG:pymongo.command:{"clientId": {"$oid": "..."}, "message": "Command started", "command": "{\"insert\": \"test\", \"ordered\": true, \"lsid\": {\"id\": {\"$binary\": {\"base64\": \"GI7ubVhPSsWd7+OwHEFx6Q==\", \"subType\": \"04\"}}}, \"$db\": \"db\", \"documents\": [{\"x\": 1, \"_id\": {\"$oid\": \"...\"}}]}", "commandName": "insert", "databaseName": "db", "requestId": ..., "operationId": ..., "driverConnectionId": 1, "serverConnectionId": 3554, "serverHost": "localhost", "serverPort": 27017} + DEBUG:pymongo.command:{"clientId": {"$oid": "..."}, "message": "Command started", "command": "{\"insert\": \"test\", \"ordered\": true, \"lsid\": {\"id\": {\"$binary\": {\"base64\": \"...\", \"subType\": \"04\"}}}, \"$db\": \"db\", \"documents\": [{\"x\": 1, \"_id\": {\"$oid\": \"...\"}}]}", "commandName": "insert", "databaseName": "db", "requestId": ..., "operationId": ..., "driverConnectionId": 1, "serverConnectionId": 3554, "serverHost": "localhost", "serverPort": 27017} Configuring Truncation ----------------------