Skip to content

Commit

Permalink
Added troubleshooting section to the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Oct 9, 2020
1 parent f543839 commit 32e0e29
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,24 @@ Or for ``asyncio``::

The single argument passed to the method is the number of seconds to sleep
for.

Debugging and Troubleshooting
-----------------------------

To help you debug issues, the client can be configured to output logs to the
terminal::

import engineio

# standard Python
eio = engineio.Client(logger=True)

# asyncio
eio = engineio.AsyncClient(logger=True)

The ``logger`` argument can be set to ``True`` to output logs to ``stderr``, or
to an object compatible with Python's ``logging`` package where the logs should
be emitted to. A value of ``False`` disables logging.

Logging can help identify the cause of connection problems, unexpected
disconnections and other issues.
21 changes: 21 additions & 0 deletions docs/server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,27 @@ Or for ``asyncio``::
The single argument passed to the method is the number of seconds to sleep
for.

Debugging and Troubleshooting
-----------------------------

To help you debug issues, the server can be configured to output logs to the
terminal::

import engineio

# standard Python
eio = engineio.Server(logger=True)

# asyncio
eio = engineio.AsyncServer(logger=True)

The ``logger`` argument can be set to ``True`` to output logs to ``stderr``, or
to an object compatible with Python's ``logging`` package where the logs should
be emitted to. A value of ``False`` disables logging.

Logging can help identify the cause of connection problems, 400 responses,
bad performance and other issues.

.. _deployment-strategies:

Deployment Strategies
Expand Down

0 comments on commit 32e0e29

Please sign in to comment.