From ea2f35fb2430dd201d38377ef625a2bbc4cb8d7d Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Wed, 30 Sep 2015 20:02:37 +0200 Subject: Set up logging module in examples Without setting up the logging module, a god number of error conditions and warnings will never be output by the library. This is a common pitfall to forget and it's not documented good enough the consequences of not setting up the logging module when developing applications with this library. --- examples/echo.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'examples/echo.py') diff --git a/examples/echo.py b/examples/echo.py index d2b4b20f..21908533 100644 --- a/examples/echo.py +++ b/examples/echo.py @@ -1,4 +1,8 @@ import discord +import logging + +# Set up the logging module to output diagnostic to the console. +logging.basicConfig() client = discord.Client() client.login('email', 'password') -- cgit v1.2.3