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.
This commit is contained in:
parent
a98324fbf8
commit
ea2f35fb24
@ -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')
|
||||
|
@ -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')
|
||||
|
@ -1,5 +1,9 @@
|
||||
import discord
|
||||
import time
|
||||
import logging
|
||||
|
||||
# Set up the logging module to output diagnostic to the console.
|
||||
logging.basicConfig()
|
||||
|
||||
client = discord.Client()
|
||||
client.login('email', 'password')
|
||||
|
@ -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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user