Skip to content

Commit e70aa88

Browse files
committed
DOCSP-48327: Address technical feedback on Logging page (#219)
(cherry picked from commit 15d495b)
1 parent 5c142a8 commit e70aa88

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

source/logging.txt

+8-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ logging library, see the `Python logging library documentation <https://docs.pyt
3737
Examples
3838
--------
3939

40-
The follwing example sets the global logging level to ``INFO``:
40+
The following example sets the global logging level to ``INFO``:
4141

4242
.. code-block:: python
4343

@@ -52,6 +52,13 @@ The following example sets the log level on the ``pymongo.command`` component to
5252
import logging
5353
logging.getLogger("pymongo.command").setLevel(logging.DEBUG)
5454

55+
Messages that the driver outputs will have the log level specified at the beginning of the
56+
message, as shown by this example ``DEBUG`` message:
57+
58+
.. code-block:: none
59+
60+
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}
61+
5562
Configuring Truncation
5663
----------------------
5764

0 commit comments

Comments
 (0)