Skip to content

Commit

Permalink
Add info logs
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyui committed Jun 22, 2024
1 parent bb8325d commit f0a2310
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/api/v1/cheesegull.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import logging
from datetime import datetime

from fastapi import APIRouter
Expand Down Expand Up @@ -110,6 +111,10 @@ async def cheesegull_beatmap(beatmap_id: int):
if osu_api_beatmap is None:
return Response(status_code=404)
cheesegull_beatmap = CheesegullBeatmap.from_osu_api_beatmap(osu_api_beatmap)
logging.info(
"Serving cheesegull beatmap",
extra={"beatmap_id": beatmap_id},
)
return cheesegull_beatmap.model_dump()


Expand All @@ -121,4 +126,8 @@ async def cheesegull_beatmapset(beatmapset_id: int):
cheesegull_beatmapset = CheesegullBeatmapset.from_osu_api_beatmapset(
osu_api_beatmapset,
)
logging.info(
"Serving cheesegull beatmapset",
extra={"beatmapset_id": beatmapset_id},
)
return cheesegull_beatmapset.model_dump()

0 comments on commit f0a2310

Please sign in to comment.