mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 20:28:38 +00:00
Fix AttributeError in logging example
This commit is contained in:
parent
922e52b6df
commit
123da00ad0
@ -49,12 +49,13 @@ More advanced setups are possible with the :mod:`logging` module. The example be
|
|||||||
|
|
||||||
import discord
|
import discord
|
||||||
import logging
|
import logging
|
||||||
|
import logging.handlers
|
||||||
|
|
||||||
logger = logging.getLogger('discord')
|
logger = logging.getLogger('discord')
|
||||||
logger.setLevel(logging.DEBUG)
|
logger.setLevel(logging.DEBUG)
|
||||||
logging.getLogger('discord.http').setLevel(logging.INFO)
|
logging.getLogger('discord.http').setLevel(logging.INFO)
|
||||||
|
|
||||||
handler = logging.RotatingFileHandler(
|
handler = logging.handlers.RotatingFileHandler(
|
||||||
filename='discord.log',
|
filename='discord.log',
|
||||||
encoding='utf-8',
|
encoding='utf-8',
|
||||||
maxBytes=32 * 1024 * 1024, # 32 MiB
|
maxBytes=32 * 1024 * 1024, # 32 MiB
|
||||||
|
Loading…
x
Reference in New Issue
Block a user