From de5bb689a1b04ccbcc367b775944a1389fa1692b Mon Sep 17 00:00:00 2001 From: Arjun Satarkar Date: Wed, 17 Jul 2024 16:05:10 +0530 Subject: wplink: fix logging --- wplink/wplink.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wplink/wplink.py b/wplink/wplink.py index 0cdd003..1da38ff 100644 --- a/wplink/wplink.py +++ b/wplink/wplink.py @@ -10,6 +10,7 @@ import urllib.parse class WPLink(commands.Cog): def __init__(self, bot): self.bot = bot + self.logger = logging.getLogger("red.aps-cogs.wplink") @commands.Cog.listener() async def on_message(self, message: discord.Message): @@ -37,7 +38,7 @@ class WPLink(commands.Cog): @async_lru.alru_cache(maxsize=512) async def look_up_page(self, title: str) -> str | None: - logging.info("Looking up page title %s", title) + self.logger.info("Looking up page title %s", title) MAX_URL_SIZE = 400 query_url = f"https://en.wikipedia.org/wiki/Special:Search?search={urllib.parse.quote(title)}&go=Go" async with aiohttp.ClientSession() as session: -- cgit v1.2.3-57-g22cb