Skip to content

Commit b423d0e

Browse files
Improvements to the logging documentation
1 parent c52e93b commit b423d0e

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

docs/client.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,14 @@ terminal::
198198

199199
The ``logger`` argument controls logging related to the Socket.IO protocol,
200200
while ``engineio_logger`` controls logs that originate in the low-level
201-
Engine.IO transport. These arguments can be set to ``True`` to output logs to
202-
``stderr``, or to an object compatible with Python's ``logging`` package
203-
where the logs should be emitted to. A value of ``False`` disables logging.
201+
Engine.IO transport. The value given to these arguments controls logging
202+
behavior:
203+
204+
* ``True``: Enables log output to ``stderr`` at the ``INFO`` level.
205+
* ``False``: Enables log output to ``stderr`` at the ``ERROR`` level. This is
206+
the default.
207+
* A ``logging.Logger`` instance: Uses the provided logger without additional
208+
configuration.
204209

205210
Logging can help identify the cause of connection problems, unexpected
206211
disconnections and other issues.

docs/server.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -657,9 +657,14 @@ terminal::
657657

658658
The ``logger`` argument controls logging related to the Socket.IO protocol,
659659
while ``engineio_logger`` controls logs that originate in the low-level
660-
Engine.IO transport. These arguments can be set to ``True`` to output logs to
661-
``stderr``, or to an object compatible with Python's ``logging`` package
662-
where the logs should be emitted to. A value of ``False`` disables logging.
660+
Engine.IO transport. The value given to these arguments controls logging
661+
behavior:
662+
663+
* ``True``: Enables log output to ``stderr`` at the ``INFO`` level.
664+
* ``False``: Enables log output to ``stderr`` at the ``ERROR`` level. This is
665+
the default.
666+
* A ``logging.Logger`` instance: Uses the provided logger without additional
667+
configuration.
663668

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

0 commit comments

Comments
 (0)