mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-16 18:59:09 +00:00
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 discord
|
||||||
|
import logging
|
||||||
|
|
||||||
|
# Set up the logging module to output diagnostic to the console.
|
||||||
|
logging.basicConfig()
|
||||||
|
|
||||||
client = discord.Client()
|
client = discord.Client()
|
||||||
client.login('email', 'password')
|
client.login('email', 'password')
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
import discord
|
import discord
|
||||||
|
import logging
|
||||||
|
|
||||||
|
# Set up the logging module to output diagnostic to the console.
|
||||||
|
logging.basicConfig()
|
||||||
|
|
||||||
client = discord.Client()
|
client = discord.Client()
|
||||||
client.login('email', 'password')
|
client.login('email', 'password')
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
import discord
|
import discord
|
||||||
import time
|
import time
|
||||||
|
import logging
|
||||||
|
|
||||||
|
# Set up the logging module to output diagnostic to the console.
|
||||||
|
logging.basicConfig()
|
||||||
|
|
||||||
client = discord.Client()
|
client = discord.Client()
|
||||||
client.login('email', 'password')
|
client.login('email', 'password')
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
import discord
|
import discord
|
||||||
|
import logging
|
||||||
|
|
||||||
|
# Set up the logging module to output diagnostic to the console.
|
||||||
|
logging.basicConfig()
|
||||||
|
|
||||||
client = discord.Client()
|
client = discord.Client()
|
||||||
client.login('email', 'password')
|
client.login('email', 'password')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user