aboutsummaryrefslogtreecommitdiff
path: root/docs/logging.rst
diff options
context:
space:
mode:
authorHornwitser <[email protected]>2015-10-22 21:23:36 +0200
committerHornwitser <[email protected]>2015-10-22 22:07:50 +0200
commit320cd39b6ac2bfd63a2498ee481c7e0c8ba98b8e (patch)
tree1b86757f2bad14cf9d705b22ea71d27b79ad7fa9 /docs/logging.rst
parentAdd instructions for installing development version. (diff)
downloaddiscord.py-320cd39b6ac2bfd63a2498ee481c7e0c8ba98b8e.tar.xz
discord.py-320cd39b6ac2bfd63a2498ee481c7e0c8ba98b8e.zip
Print to stderr in on_error
Apparently the clever hack for logging in on_error was not so clever after all. If logging isn't configured, by the logging modules definition of not configured, which is root logger not having an Handlers attached, it will call logging.basicConfig(). Which messes up setups that define handlers for other loggers than the root logger. Going directly to the root logger rather than using the broken convenience methods for logger is not an option either, as logger before Python 3.2 does not have lastResort on the root logger, and prints an error when invoked without any handlers. Resolve by printing tracebacks to stderr by default in on_error.
Diffstat (limited to 'docs/logging.rst')
-rw-r--r--docs/logging.rst9
1 files changed, 4 insertions, 5 deletions
diff --git a/docs/logging.rst b/docs/logging.rst
index 6490f9fa..418453b3 100644
--- a/docs/logging.rst
+++ b/docs/logging.rst
@@ -4,11 +4,10 @@
Setting Up Logging
===================
-*discord.py* logs errors, exceptions, and debug information via the
-`logging`_ python module. It is strongly recommended that the logging
-module is configured, as no errors or warnings will be output at all if
-it is not set up. Configuration of the ``logging`` module can be as
-simple as::
+*discord.py* logs errors and debug information via the `logging`_ python
+module. It is strongly recommended that the logging module is
+configured, as no errors or warnings will be output if it is not set up.
+Configuration of the ``logging`` module can be as simple as::
import logging