add a bunch more readthedocs from wiki

This commit is contained in:
Jeff
2017-11-20 12:12:31 +08:00
parent 34e7ae026e
commit f6ec7e47a7
17 changed files with 1067 additions and 133 deletions

View File

@@ -0,0 +1,24 @@
================
Enable Logging
================
Telethon makes use of the `logging`__ module, and you can enable it as follows:
.. code-block:: python
import logging
logging.basicConfig(level=logging.DEBUG)
You can also use it in your own project very easily:
.. code-block:: python
import logging
logger = logging.getLogger(__name__)
logger.debug('Debug messages')
logger.info('Useful information')
logger.warning('This is a warning!')
__ https://docs.python.org/3/library/logging.html