|
| 1 | +.. _debugging: |
| 2 | + |
| 3 | +.. currentmodule:: twitchio |
| 4 | + |
| 5 | +Debugging |
| 6 | +######### |
| 7 | + |
| 8 | +Most issues can be resolved by checking the :ref:`faqs` or by asking in our `Discord <https://discord.gg/RAKc3HF>`_. |
| 9 | + |
| 10 | +If you believe you have found a bug or issue with the library please make an issue on `GitHub <https://github.com/PythonistaGuild/TwitchIO/issues>`_. |
| 11 | + |
| 12 | + |
| 13 | +Logging |
| 14 | +-------- |
| 15 | + |
| 16 | +To make it easier for us to debug your issue, we will often ask for DEBUG level logging. You can easily setup logging with the |
| 17 | +:func:`~twitchio.utils.setup_logging` function. |
| 18 | + |
| 19 | +.. code:: python3 |
| 20 | + |
| 21 | + import logging |
| 22 | + import twitchio |
| 23 | +
|
| 24 | + handler = logging.FileHandler(filename='twitchio.log', encoding='utf-8', mode='w') |
| 25 | + twitchio.utils.setup_logging(level=logging.DEBUG, handler=handler) |
| 26 | +
|
| 27 | +
|
| 28 | +You should only need to call this function once, before the bot is started. |
| 29 | + |
| 30 | +Capture and include logs leading upto and shortly after the issue. Please note this file can get very large very quickly and you |
| 31 | +may need to setup a rotating logger or monitor its size. |
| 32 | + |
| 33 | + |
| 34 | +Version/System Information |
| 35 | +-------------------------- |
| 36 | + |
| 37 | +We will also often ask for your system information and versions of various libs. To make this easier you can run the following |
| 38 | +command in the environment TwitchIO is currently installed. |
| 39 | + |
| 40 | +**Windows:** |
| 41 | + |
| 42 | +``py -m twitchio --version`` |
| 43 | + |
| 44 | + |
| 45 | +**Linux:** |
| 46 | + |
| 47 | +``python -m twitchio --version`` |
| 48 | + |
| 49 | +Please make sure to copy the whole output of this command as it is all useful. |
| 50 | + |
| 51 | + |
| 52 | +Minimum Reproducible Example |
| 53 | +---------------------------- |
| 54 | + |
| 55 | +Please have ready and include a minimal example of how to reproduce your issue, including any required steps needed when asking for help. |
| 56 | +This allows us to help more effeciently. |
0 commit comments