diff options
| author | Hornwitser <[email protected]> | 2015-09-30 20:02:37 +0200 |
|---|---|---|
| committer | Hornwitser <[email protected]> | 2015-10-06 19:09:16 +0200 |
| commit | ea2f35fb2430dd201d38377ef625a2bbc4cb8d7d (patch) | |
| tree | 151f84d5e250a452b3b9307f1c861a53ab618167 /examples/reply.py | |
| parent | Add handling of login failure in examples (diff) | |
| download | discord.py-ea2f35fb2430dd201d38377ef625a2bbc4cb8d7d.tar.xz discord.py-ea2f35fb2430dd201d38377ef625a2bbc4cb8d7d.zip | |
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.
Diffstat (limited to 'examples/reply.py')
| -rw-r--r-- | examples/reply.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/reply.py b/examples/reply.py index 0697704d..e23db962 100644 --- a/examples/reply.py +++ b/examples/reply.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') |