From eb611b327277bb215f2168e3c5a9f36a10d6f8f0 Mon Sep 17 00:00:00 2001 From: Kellenn <70085049+Kellenn@users.noreply.github.com> Date: Fri, 17 Jun 2022 19:57:22 -0600 Subject: [PATCH] Fix AttributeError in logging example --- docs/logging.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/logging.rst b/docs/logging.rst index 5d2bdf319..b2e18f977 100644 --- a/docs/logging.rst +++ b/docs/logging.rst @@ -49,12 +49,13 @@ More advanced setups are possible with the :mod:`logging` module. The example be import discord import logging + import logging.handlers logger = logging.getLogger('discord') logger.setLevel(logging.DEBUG) logging.getLogger('discord.http').setLevel(logging.INFO) - handler = logging.RotatingFileHandler( + handler = logging.handlers.RotatingFileHandler( filename='discord.log', encoding='utf-8', maxBytes=32 * 1024 * 1024, # 32 MiB