Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion source/logging.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ logging library, see the `Python logging library documentation <https://docs.pyt
Examples
--------

The follwing example sets the global logging level to ``INFO``:
The following example sets the global logging level to ``INFO``:

.. code-block:: python

Expand All @@ -52,6 +52,13 @@ The following example sets the log level on the ``pymongo.command`` component to
import logging
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:

.. code-block:: none

INFO:pymongo.mongo_client:MongoClient opened default port on mongodb://localhost:27017/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use a pymongo.command log message here to match the example above?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!


Configuring Truncation
----------------------

Expand Down
Loading