summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-11-22 01:40:09 +0100
committerVictor Stinner <victor.stinner@gmail.com>2014-11-22 01:40:09 +0100
commit0e2e0be347682ded1fd1373a5fb0392825802ce7 (patch)
tree5a290251ff1b814ea5190c3ad159bca0f114da55
parent3f3bc71a9d84bd0d606630e711253488d1ae5e0e (diff)
downloadaioeventlet-0e2e0be347682ded1fd1373a5fb0392825802ce7.tar.gz
doc: debug mode
-rw-r--r--doc/using.rst23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/using.rst b/doc/using.rst
index f9833b8..5fcf043 100644
--- a/doc/using.rst
+++ b/doc/using.rst
@@ -79,6 +79,29 @@ Hello World::
<https://docs.python.org/dev/library/asyncio.html>`_.
+Debug mode
+----------
+
+To enable the debug mode globally when using trollius, set the environment
+variable ``TROLLIUSDEBUG`` to ``1``. To see debug traces, set the log level of
+the trollius logger to ``logging.DEBUG``. The simplest configuration is::
+
+ import logging
+ # ...
+ logging.basicConfig(level=logging.DEBUG)
+
+If you use asyncio, use the ``PYTHONASYNCIODEBUG`` environment variable
+instead of the ``TROLLIUSDEBUG`` variable.
+
+You can also call ``loop.set_debug(True)`` to enable the debug mode of the
+event loop, but it enables less debug checks.
+
+.. seealso::
+ Read the `Develop with asyncio
+ <https://docs.python.org/dev/library/asyncio-dev.html>`_ section of the
+ asyncio documentation.
+
+
API
===