normalized-log-fix2

This commit is contained in:
Untone 2024-09-28 10:27:20 +03:00
parent 89abb68af5
commit 366a8b5d1b

View File

@ -6,7 +6,7 @@ from bot.config import BOT_TOKEN
import logging
# Create a logger instance
logger = logging.getLogger("bot.api")
logger = logging.getLogger(" [bot.api] ")
api_base = f"https://api.telegram.org/bot{BOT_TOKEN}/"
@ -49,4 +49,4 @@ async def download_file(file_id):
await temp_file.flush()
yield temp_file.name # Yield the path of the temporary file
else:
raise Exception(f"Failed to download file: {response.status}")
logger.error(f"Failed to download file: {response.status}")