aboutsummaryrefslogtreecommitdiff
path: root/wplink/wplink.py
diff options
context:
space:
mode:
authorArjun Satarkar <me@arjunsatarkar.net>2024-07-17 10:35:10 +0000
committerArjun Satarkar <me@arjunsatarkar.net>2024-07-17 10:35:10 +0000
commitde5bb689a1b04ccbcc367b775944a1389fa1692b (patch)
tree785ff36ae7d887f60d9ad4c44191bfea8c75193c /wplink/wplink.py
parent65c586632ae421b45c084630f448e67f6c7a7a02 (diff)
downloadaps-cogs-de5bb689a1b04ccbcc367b775944a1389fa1692b.tar
aps-cogs-de5bb689a1b04ccbcc367b775944a1389fa1692b.tar.gz
aps-cogs-de5bb689a1b04ccbcc367b775944a1389fa1692b.zip
wplink: fix logging
Diffstat (limited to 'wplink/wplink.py')
-rw-r--r--wplink/wplink.py3
1 files changed, 2 insertions, 1 deletions
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: