Skip to content

Commit bbfe323

Browse files
authored
add information about logging interactions (#23)
1 parent c0526a9 commit bbfe323

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,15 @@ Given a script that contains ``pymongo`` commands within it, you can simply run:
114114

115115
python3 -m pymongoexplain <path/to/your/script.py>
116116

117-
This will print out the explain output for every single command
118-
within that script, in addition to running the script itself.
117+
This will log the explain output for every single command
118+
within the specified script, **in addition to running every command** in the script itself. Do note that because the
119+
explain output is generated using the `logging <https://docs.python.org/3/library/logging.html>`_ module,
120+
if your script configures logging module there are certain things to keep in mind:
121+
122+
- if your script sets the `logging level <https://docs.python.org/3/library/logging.html#logging-levels>`_
123+
higher than INFO, the explain output will be suppressed entirely.
124+
- the explain output will be sent to whatever stream your script configures the logging module to send output to.
125+
119126

120127
Any positional parameters or arguments required by your script can be
121128
simply be appended to the invocation as follows::

0 commit comments

Comments
 (0)